From: Jason Etheridge Date: Mon, 15 Nov 2021 22:30:17 +0000 (-0500) Subject: LP1950826 fix invalidate email action X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6eb549a931c8fb234b341e62ba61010b3e47bb65;p=evergreen%2Ftadl.git LP1950826 fix invalidate email action and other invalidate contact actions Signed-off-by: Jason Etheridge Signed-off-by: Terran McCanna Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/BadContact.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/BadContact.pm index 28ee239d62..c8972a3b4e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/BadContact.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/BadContact.pm @@ -98,10 +98,15 @@ sub mark_users_contact_invalid { $usr_penalty->org_unit($penalty_ou); $usr_penalty->standing_penalty($penalty->id); $usr_penalty->staff($staff_id); - $usr_penalty->note($_->$contact_type); - $editor->create_actor_user_standing_penalty($usr_penalty) or - return $editor->die_event; + my ($result) = $U->simplereq('open-ils.actor', 'open-ils.actor.user.penalty.apply', + $editor->authtoken, + $usr_penalty, + { message => $_->$contact_type } + ); + + # 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'; $_->$clear_meth; $editor->update_actor_user($_) or return $editor->die_event;