From: Bill Erickson Date: Wed, 16 Mar 2022 18:22:13 +0000 (-0400) Subject: LP1950826 Return error result on contact invalidation X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2d76a732f3e21c744d45db774db85e08c1743380;p=working%2FEvergreen.git LP1950826 Return error result on contact invalidation If penalty creation fails, return the error/event response to the caller instead of the editor's last event. Signed-off-by: Bill Erickson Signed-off-by: Christine Burns --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/BadContact.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/BadContact.pm index c8972a3b4e..40dbe19312 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/BadContact.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/BadContact.pm @@ -106,7 +106,10 @@ sub mark_users_contact_invalid { ); # FIXME: this perpetuates a bug; the patron editor UI doesn't handle these error states well - return $editor->die_event if $result && ref $result eq 'HASH'; + if ($result && ref $result eq 'HASH') { + $editor->rollback; + return $result; + } $_->$clear_meth; $editor->update_actor_user($_) or return $editor->die_event;