more transaction cleanups
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 24 Sep 2010 23:04:45 +0000 (23:04 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 24 Sep 2010 23:04:45 +0000 (23:04 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17980 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Booking.pm

index ff9572a..5e75fa8 100644 (file)
@@ -1291,12 +1291,13 @@ sub get_bresv_by_returnable_resource_barcode {
     }) or return $e->die_event;
 
     if (@$rows < 1) {
+        $e->rollback;
         return $rows;
     } else {
         # More than one result might be possible, but we don't want to return
         # more than one at this time.
         my $id = $rows->[0]->{"id"};
-        return $e->retrieve_booking_reservation([
+        my $resp =$e->retrieve_booking_reservation([
             $id, {
                 "flesh" => 2,
                 "flesh_fields" => {
@@ -1305,6 +1306,8 @@ sub get_bresv_by_returnable_resource_barcode {
                 }
             }
         ]) or $e->die_event;
+        $e->rollback;
+        return $resp;
     }
 }