From 58d28d99efdc071049f99be5c551ab5e0adbd347 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 18 Jul 2024 07:27:47 -0400 Subject: [PATCH] Bug 37400 - In returns.pl don't search for a patron unless needed In returns.pl we find a patron, then use it in an if statement. Test Plan: Cancel a hold with other holds remaining on the record. No change should be noted. --- circ/returns.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circ/returns.pl b/circ/returns.pl index 3fd20c65913..1e0dfc0e603 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -173,8 +173,8 @@ if ( $query->param('reserve_id') ) { # FIXME do we need to do this if we didn't take the cancel_reserve branch above? my ( undef, $nextreservinfo, undef ) = CheckReserves($item); - my $patron = Koha::Patrons->find( $nextreservinfo->{'borrowernumber'} ); if ( $userenv_branch ne $nextreservinfo->{'branchcode'} ) { + my $patron = Koha::Patrons->find( $nextreservinfo->{'borrowernumber'} ); $template->param( itemtitle => $biblio->title, itembiblionumber => $biblio->biblionumber, -- 2.30.2