From a6dde67d5bd5ad1df871f00dbe91f5ce58cee359 Mon Sep 17 00:00:00 2001 From: miker Date: Sun, 1 Mar 2009 18:51:40 +0000 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 { -- 2.43.2