roll back xact in set_item_lost when copy is alrady marked lost and we exit the sub...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 5 Jan 2011 14:47:20 +0000 (14:47 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 5 Jan 2011 14:47:20 +0000 (14:47 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19123 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Cat/AssetCommon.pm
Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm

index 75f96e6..b2dffc5 100644 (file)
@@ -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;
 
     # ---------------------------------------------------------------------
index 9845623..ff298f4 100644 (file)
@@ -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;
 }