From: miker Date: Sun, 1 Mar 2009 18:51:40 +0000 (+0000) Subject: support might_have (search-based, single-valued) in path fleshing X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a6dde67d5bd5ad1df871f00dbe91f5ce58cee359;p=Evergreen.git support might_have (search-based, single-valued) in path fleshing git-svn-id: svn://svn.open-ils.org/ILS/trunk@12334 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 0b3a249296..e237a3b345 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm @@ -418,7 +418,7 @@ sub _object_by_path { my $meth = 'retrieve_'; my $multi = 0; my $lfield = $step; - if ($rtype eq 'has_many') { + if ($rtype ne 'has_a') { $meth = 'search_'; $multi = 1; $lfield = $context->Identity; @@ -442,7 +442,7 @@ sub _object_by_path { $self->_object_by_path( $_, $collector, $label, $path ) for (@$obj_list); - $obj = $$obj_list[0] if (!$multi); + $obj = $$obj_list[0] if (!$multi || $rtype eq 'might_have'); $context->$step( $obj ) if ($obj && (!$label || !@$label)); } else {