From c6e0c49e8e2921e909b66f99425e7607d2ab03eb Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 1 May 2024 12:58:17 +0100 Subject: [PATCH] Bug 27753: Example of how we might set to librarian instead of patron --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 2e24b990759..bff0b1e2f56 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2546,7 +2546,7 @@ sub AddReturn { my $autoClaimReturnCheckin = C4::Context->preference('AutoClaimReturnStatusOnCheckin'); if ($autoClaimReturnCheckin) { - my $patron_id = $patron->borrowernumber; + my $patron_id = C4::Context->userenv ? C4::Context->userenv->{'number'} : undef; my $resolution = $autoClaimReturnCheckin; $claim->resolve( -- 2.44.0