From 2d76a732f3e21c744d45db774db85e08c1743380 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 16 Mar 2022 14:22:13 -0400 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/lib/OpenILS/Utils/BadContact.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.11.0