If penalty creation fails, return the error/event response to the caller
instead of the editor's last event.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Christine Burns <christine.burns@bc.libraries.coop>
);
# 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;