From fdd695605b14dba4dc4ea1cbae68b0ffb34cac96 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Sun, 6 Mar 2016 18:09:30 -0500 Subject: [PATCH] LP1550035 Address deletion / avoid xact collisions Avoid transaction collision errors when updating patrons, in cases where the patron object has to be updated more than once, by refreshing the last_xact_id value on the in-progress patron object. Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm index 56205f2ddf..87fb870dc3 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm @@ -667,6 +667,10 @@ sub _update_patron { $e->update_actor_user($patron) or return (undef, $e->die_event); + # re-fetch the user to pick up the latest last_xact_id value + # to avoid collisions. + $patron = $e->retrieve_actor_user($patron->id); + return ($patron); } -- 2.43.2