[open-ils-commits] r13883 - trunk/Open-ILS/src/perlmods/OpenILS/Application (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Aug 19 11:58:54 EDT 2009


Author: erickson
Date: 2009-08-19 11:58:51 -0400 (Wed, 19 Aug 2009)
New Revision: 13883

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
Log:
if the requested hook does not exist, gracefully back out

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm	2009-08-19 14:11:22 UTC (rev 13882)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm	2009-08-19 15:58:51 UTC (rev 13883)
@@ -42,6 +42,11 @@
         }
     );
 
+    unless(@$hooks) {
+        $editor->rollback;
+        return undef;
+    }
+
     my %hook_hash = map { ($_->key, $_) } @$hooks;
 
     my $orgs = $editor->json_query({ from => [ 'actor.org_unit_ancestors' => $location ] });



More information about the open-ils-commits mailing list