From 025a7aa6de0791d0eacd30827f27f623290c8096 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 2 Mar 2009 20:27:55 +0000 Subject: [PATCH] leave existing intermediate objects alone in the path if they are already fleshed git-svn-id: svn://svn.open-ils.org/ILS/trunk@12356 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm b/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm index d3dc043a9b..d6781cf94e 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm @@ -432,13 +432,20 @@ sub _object_by_path { $self->editor : new_rstore_editor(); - my $obj = $ed->$meth( - ($multi) ? { $ffield => $context->$lfield() } : $context->$lfield() ); + my $obj = $context->$step(); + + if (!ref $obj) { + $obj = $ed->$meth( + ($multi) ? + { $ffield => $context->$lfield() } : + $context->$lfield() + ); + } if (@$path) { my $obj_list = []; - if (!$multi) { + if (!$multi || $rtype eq 'might_have') { $obj_list = [$obj] if ($obj); } else { $obj_list = $obj; -- 2.11.0