[open-ils-commits] r14872 - trunk/Open-ILS/src/perlmods/OpenILS/Application (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Nov 11 16:25:12 EST 2009


Author: erickson
Date: 2009-11-11 16:25:06 -0500 (Wed, 11 Nov 2009)
New Revision: 14872

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Log:
for consistency, also flesh the copy in the resulting circ/hold objects

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	2009-11-11 21:21:32 UTC (rev 14871)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	2009-11-11 21:25:06 UTC (rev 14872)
@@ -3437,6 +3437,8 @@
 
     (my $obj_type = $self->api_name) =~ s/.*\.([a-z]+)$/$1/;
 
+    my $copy = $e->retrieve_asset_copy($copy_id) or return $e->event;
+
     my $copy_field = 'target_copy';
     $copy_field = 'current_copy' if $obj_type eq 'ahr';
 
@@ -3447,6 +3449,7 @@
         where => {$copy_field => $copy_id}
     };
 
+
     my $ses = OpenSRF::AppSession->create('open-ils.trigger');
     my $req = $ses->request('open-ils.trigger.events_by_target', 
         $obj_type, $filters, {atevdef => ['reactor', 'validator']}, 2);
@@ -3460,6 +3463,8 @@
             return $e->event unless $e->allowed('VIEW_USER', $user->home_ou);
         }
 
+        $tgt->$copy_field($copy);
+
         $tgt->usr($user);
         $conn->respond($val) if $val;
     }



More information about the open-ils-commits mailing list