[open-ils-commits] r19123 - in trunk/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:47:22 EST 2011


Author: erickson
Date: 2011-01-05 09:47:20 -0500 (Wed, 05 Jan 2011)
New Revision: 19123

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm
   trunk/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

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm	2011-01-05 04:26:02 UTC (rev 19122)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm	2011-01-05 14:47:20 UTC (rev 19123)
@@ -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: trunk/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm	2011-01-05 04:26:02 UTC (rev 19122)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm	2011-01-05 14:47:20 UTC (rev 19123)
@@ -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