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

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Mar 2 15:27:59 EST 2009


Author: miker
Date: 2009-03-02 15:27:55 -0500 (Mon, 02 Mar 2009)
New Revision: 12356

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
Log:
leave existing intermediate objects alone in the path if they are already fleshed

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm	2009-03-02 19:50:40 UTC (rev 12355)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm	2009-03-02 20:27:55 UTC (rev 12356)
@@ -432,13 +432,20 @@
             $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;



More information about the open-ils-commits mailing list