From cd617f05d0c1dd61440e9316136b3cf1342cc3c7 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Fri, 25 Jul 2025 13:40:14 +0000 Subject: [PATCH] Bug 39180: (QA follow-up) Tidy --- C4/Circulation.pm | 16 +++++++--------- circ/returns.pl | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index d2dc13a3e9..48185eb022 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1784,11 +1784,11 @@ sub AddIssue { ); } $issue->discard_changes; + #Update borrowers.lastseen - try{ + try { $patron->update_lastseen('check_out'); - } - catch { + } catch { my $exception = $_; warn "Problem updating lastseen date for borrowernumber " . $patron->borrowernumber . ": $exception"; }; @@ -2589,10 +2589,9 @@ sub AddReturn { if C4::Context->preference("ReturnLog"); #Update borrowers.lastseen - try{ + try { $patron->update_lastseen('check_in'); - } - catch { + } catch { my $exception = $_; warn "Problem updating lastseen date for borrowernumber " . $patron->borrowernumber . ": $exception"; $messages->{UpdateLastSeenError} = "$exception"; @@ -3544,10 +3543,9 @@ sub AddRenewal { ); #Update borrowers.lastseen - try{ + try { $patron->update_lastseen('renewal'); - } - catch { + } catch { my $exception = $_; warn "Problem updating lastseen date for borrowernumber " . $patron->borrowernumber . ": $exception"; }; diff --git a/circ/returns.pl b/circ/returns.pl index 70c5b02e0f..901877ef1e 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -744,7 +744,7 @@ foreach my $code ( keys %$messages ) { } elsif ( $code eq 'InBundle' ) { $template->param( InBundle => $messages->{InBundle} ); } elsif ( $code eq 'UpdateLastSeenError' ) { - $err{UpdateLastSeenError} = $messages->{UpdateLastSeenError}; + $err{UpdateLastSeenError} = $messages->{UpdateLastSeenError}; } else { die "Unknown error code $code"; # note we need all the (empty) elsif's above, or we die. # This forces the issue of staying in sync w/ Circulation.pm -- 2.43.0