Use auth in savepoint name
authorJason Stephenson <jason@sigio.com>
Sat, 8 Jan 2022 19:20:00 +0000 (14:20 -0500)
committerJason Stephenson <jason@sigio.com>
Sat, 8 Jan 2022 19:20:00 +0000 (14:20 -0500)
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm

index 7e57a65..912f951 100644 (file)
@@ -380,7 +380,7 @@ sub update_copy_inventory {
     return [0, 0, $e->die_event] unless $e->checkauth;
 
     my ($success,$failure) = (0,0);
-
+    my $spname = "aci_savepoint_" . substr($auth, 0, 8);
     $e->xact_begin();
     my $copies = $$args{copy_list};
     foreach my $copyid (@$copies) {
@@ -388,7 +388,6 @@ sub update_copy_inventory {
         $aci->inventory_date('now');
         $aci->inventory_workstation($e->requestor->wsid);
         $aci->copy($copyid);
-        my $spname = "aci_savepoint${success}";
         $e->set_savepoint($spname);
         if ($e->create_asset_copy_inventory($aci)) {
             $success++;