From 6eb549a931c8fb234b341e62ba61010b3e47bb65 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Mon, 15 Nov 2021 17:30:17 -0500 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/lib/OpenILS/Utils/BadContact.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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; -- 2.11.0