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 <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
$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);
}