From: Bill Erickson Date: Sun, 6 Mar 2016 23:09:30 +0000 (-0500) Subject: LP1550035 Address deletion / avoid xact collisions X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fdd695605b14dba4dc4ea1cbae68b0ffb34cac96;p=evergreen%2Fmasslnc.git 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 --- 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); }