[open-ils-commits] r12334 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Sun Mar 1 13:51:43 EST 2009


Author: miker
Date: 2009-03-01 13:51:40 -0500 (Sun, 01 Mar 2009)
New Revision: 12334

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
Log:
support might_have (search-based, single-valued) in path fleshing

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm	2009-03-01 18:47:11 UTC (rev 12333)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm	2009-03-01 18:51:40 UTC (rev 12334)
@@ -418,7 +418,7 @@
     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 @@
 
         $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 {



More information about the open-ils-commits mailing list