From e97260130474e9ba947b34bc5da132d72f834d59 Mon Sep 17 00:00:00 2001 From: Nicolas Legrand Date: Thu, 5 Nov 2020 14:10:09 +0100 Subject: [PATCH] Bug 24412: (follow-up) prevent request.pl from failing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When no desk is defined request.pl returns an internal server error. Check a desk is defined before asking for reservation deskname. Plan test: 1. log in with a library with no desk 2. check in a reserved book so it'll be switch to “waiting reserve” 3. go to the book notice and click the Holds tab (request.pl page) 4. boum 5. apply patch, restart plack 6. refresh page 7. now loading properly --- reserve/request.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reserve/request.pl b/reserve/request.pl index f631556..4df90a7 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -658,7 +658,7 @@ foreach my $biblionumber (@biblionumbers) { $reserve{'itemnumber'} = $res->itemnumber(); $reserve{'wbrname'} = $res->branch()->branchname(); $reserve{'atdestination'} = $res->is_at_destination(); - $reserve{'desk_name'} = $res->desk()->desk_name(); + $reserve{'desk_name'} = ( $res->desk() ) ? $res->desk()->desk_name() : '' ; $reserve{'found'} = $res->is_found(); $reserve{'inprocessing'} = $res->is_in_processing(); $reserve{'intransit'} = $res->is_in_transit(); -- 2.1.4