From: miker Date: Mon, 2 Mar 2009 20:27:55 +0000 (+0000) Subject: leave existing intermediate objects alone in the path if they are already fleshed X-Git-Tag: sprint4-merge-nov22~10664 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=025a7aa6de0791d0eacd30827f27f623290c8096;p=working%2FEvergreen.git 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 --- 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;