From: erickson Date: Wed, 5 Jan 2011 14:48:13 +0000 (+0000) Subject: roll back xact in set_item_lost when copy is alrady marked lost and we exit the sub... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3d4bafef80d89826cf2f6fe05137ccdc8cbb19d4;p=working%2FEvergreen.git roll back xact in set_item_lost when copy is alrady marked lost and we exit the sub; if caller passes an event to editor->die_event, capture it as the editor's last event Signed-off-by: Bill Erickson git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@19124 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm b/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm index 75f96e6027..b2dffc5518 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm @@ -457,7 +457,7 @@ sub set_item_lost { $e->allowed('SET_CIRC_LOST', $circ->circ_lib) or return $e->die_event; - return OpenILS::Event->new('COPY_MARKED_LOST') + return $e->die_event(OpenILS::Event->new('COPY_MARKED_LOST')) if $copy->status == OILS_COPY_STATUS_LOST; # --------------------------------------------------------------------- diff --git a/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm b/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm index 984562362e..ff298f42d1 100644 --- a/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm @@ -149,8 +149,10 @@ sub event { # ----------------------------------------------------------------------------- sub die_event { my $self = shift; + my $evt = shift; $self->rollback; $self->died(1); + $self->event($evt); return $self->event; }