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

svn at svn.open-ils.org svn at svn.open-ils.org
Sun Mar 1 13:14:57 EST 2009


Author: miker
Date: 2009-03-01 13:14:54 -0500 (Sun, 01 Mar 2009)
New Revision: 12331

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
Log:
fleshing bugs in environment building

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm	2009-03-01 01:08:32 UTC (rev 12330)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm	2009-03-01 18:14:54 UTC (rev 12331)
@@ -443,7 +443,7 @@
         $self->_object_by_path( $_, $collector, $label, $path ) for (@$obj_list);
 
         $obj = $$obj_list[0] if (!$multi);
-        $context->$step( $obj ) if ($obj && !$label);
+        $context->$step( $obj ) if ($obj && (!$label || !@$label));
 
     } else {
 
@@ -467,9 +467,9 @@
             }
         }
 
-        if ($label) {
+        if ($label && @$label) {
             my $node = $self->environment;
-            my $i = 0; my $max = scalar(@$label) - 1;
+            my $i = 0; my $max = scalar(@$label);
             for (; $i < $max; $i++) {
                 my $part = $$label[$i];
                 $$node{$part} ||= {};



More information about the open-ils-commits mailing list