[open-ils-commits] r19124 - in branches/rel_2_0/Open-ILS/src/perlmods/OpenILS: Application/Cat Utils (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jan 5 09:48:15 EST 2011


Author: erickson
Date: 2011-01-05 09:48:13 -0500 (Wed, 05 Jan 2011)
New Revision: 19124

Modified:
   branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm
   branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm
Log:
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 <berick at esilibrary.com>

Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm	2011-01-05 14:47:20 UTC (rev 19123)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm	2011-01-05 14:48:13 UTC (rev 19124)
@@ -457,7 +457,7 @@
 
     $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;
 
     # ---------------------------------------------------------------------

Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm	2011-01-05 14:47:20 UTC (rev 19123)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm	2011-01-05 14:48:13 UTC (rev 19124)
@@ -149,8 +149,10 @@
 # -----------------------------------------------------------------------------
 sub die_event {
 	my $self = shift;
+    my $evt = shift;
 	$self->rollback;
     $self->died(1);
+    $self->event($evt);
 	return $self->event;
 }
 



More information about the open-ils-commits mailing list