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

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Mar 31 16:56:30 EDT 2009


Author: erickson
Date: 2009-03-31 16:56:25 -0400 (Tue, 31 Mar 2009)
New Revision: 12744

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Reactor.pm
Log:
in batches, 'event' is an array of events

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Reactor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Reactor.pm	2009-03-31 20:55:47 UTC (rev 12743)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Reactor.pm	2009-03-31 20:56:25 UTC (rev 12744)
@@ -83,7 +83,9 @@
 
         $env->{EventProcessor}->editor->xact_begin;
         $t_o = $env->{EventProcessor}->editor->create_action_trigger_template_output( $t_o );
-        $env->{EventProcessor}->update_state( $env->{event}->state, { template_output => $t_o->id } );
+
+        my $state = (ref $$env{event} eq 'ARRAY') ? $$env{event}->[0]->state : $env->{event}->state;
+        $env->{EventProcessor}->update_state( $state, { template_output => $t_o->id } );
     }
 	
     return $output;



More information about the open-ils-commits mailing list