From 6caff68da1dafc1a3f05aa1ccdbdafb24df577dc Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Fri, 2 Sep 2022 07:00:25 -0400 Subject: [PATCH] Bug 7021: (QA follow-up): Minor code cleanup Signed-off-by: Kyle M Hall --- C4/Circulation.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 3f322ab6c5..6faf53add9 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2345,6 +2345,7 @@ sub AddReturn { } # Record the fact that this book was returned. + my $categorycode = $patron_unblessed ? $patron_unblessed->{categorycode} : undef; C4::Stats::UpdateStats({ branch => $branch, type => $stat_type, @@ -2353,7 +2354,7 @@ sub AddReturn { location => $item->location, borrowernumber => $borrowernumber, ccode => $item->ccode, - ( $patron_unblessed ? ( categorycode => $patron_unblessed->{categorycode} ) : () ), + categorycode => $categorycode, }); # Send a check-in slip. # NOTE: borrower may be undef. Do not try to send messages then. -- 2.30.2