From 3d64757140b6d568896ddeed78da9677c540093b Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 19 Aug 2022 13:11:09 +0000 Subject: [PATCH] Bug 31112: (QA follow-up) Restore check to avoid extra processing We now count all holds for all patrons, we can still eject if we have more holds than we do items Signed-off-by: Nick Clemens --- C4/Circulation.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 85fa276028..fd006ec2e1 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2959,6 +2959,8 @@ sub CanBookBeRenewed { notforloan => 0, -not => { itemnumber => $itemnumber } })->as_list; + return ( 0, "on_reserve" ) if scalar @other_items < scalar @possible_holds; + my %matched_items; foreach my $possible_hold (@possible_holds) { my $fillable = 0; -- 2.30.2