From de532ac80a31db83c2dabf45a65b9561733fceec Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Fri, 12 Oct 2018 14:31:45 +0100 Subject: [PATCH] Bug 20581: (follow-up) Fix statusalias return As per https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20581#c57 Signed-off-by: Katrin Fischer Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- Koha/Illrequest.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index 18cd57e676..d30aba8752 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -112,15 +112,19 @@ available for request. =head3 statusalias + my $statusalias = $request->statusalias; + +Return a request's status alias, if one is defined, otherwise +return implicit undef + =cut sub statusalias { my ( $self ) = @_; - return $self->status_alias ? - Koha::AuthorisedValue->_new_from_dbic( - scalar $self->_result->status_alias - ) : - undef; + return unless $self->status_alias; + return Koha::AuthorisedValue->_new_from_dbic( + scalar $self->_result->status_alias + ); } =head3 illrequestattributes -- 2.39.5