From c0f09dd22273f4d8f9ba8da2e608b4fc17e681df Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 6 Mar 2009 20:43:27 +0000 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } } -- 2.11.0