From: erickson Date: Fri, 6 Mar 2009 20:43:27 +0000 (+0000) Subject: don't double-up arrays on might_have retrievals. handle the case where the final... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c0f09dd22273f4d8f9ba8da2e608b4fc17e681df;p=Evergreen.git don't double-up arrays on might_have retrievals. handle the case where the final object in the path is a might_have git-svn-id: svn://svn.open-ils.org/ILS/trunk@12450 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm b/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm index 8f0a8e8e51..a233a7f8d5 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm @@ -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); } }