From efef87745dd7151507b9ace17c9c64247a5e7a33 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 --- Koha/Illrequest.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index 8a97063a8b..3c1e4c23ea 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.11.0