don't double-up arrays on might_have retrievals. handle the case where the final...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 6 Mar 2009 20:43:27 +0000 (20:43 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 6 Mar 2009 20:43:27 +0000 (20:43 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12450 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm

index 8f0a8e8..a233a7f 100644 (file)
@@ -446,7 +446,7 @@ sub _object_by_path {
     if (@$path) {
 
         my $obj_list = [];
-        if (!$multi || $rtype eq 'might_have') {
+        if (!$multi) {
             $obj_list = [$obj] if ($obj);
         } else {
             $obj_list = $obj;
@@ -489,6 +489,7 @@ sub _object_by_path {
             }
             $$node{$$label[-1]} = $obj;
         } else {
+            $obj = $$obj[0] if $rtype eq 'might_have';
             $context->$step( $obj ) if ($obj);
         }
     }