From a7a3a28cc64934de993fbefa917c2506bfd3ba4f Mon Sep 17 00:00:00 2001 From: Andreas Jonsson Date: Fri, 20 Nov 2020 13:02:49 +0100 Subject: [PATCH] Bug 27065: Fix incorrect handling of return value of CanItemBeRenewed in CanBookBeRenewed --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index bcda44d6ce..2a8627a6f5 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2947,7 +2947,7 @@ sub CanBookBeRenewed { for my $borrowernumber (@borrowernumbers) { my $patron = $patrons{$borrowernumber} //= Koha::Patrons->find( $borrowernumber ); next unless IsAvailableForItemLevelRequest($item, $patron); - next unless CanItemBeReserved($borrowernumber,$itemnumber); + next unless CanItemBeReserved($borrowernumber,$itemnumber)->{status} eq 'OK'; push @reservable, $itemnumber; if (@reservable >= @borrowernumbers) { -- 2.11.0