if the requested hook does not exist, gracefully back out
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 19 Aug 2009 15:58:51 +0000 (15:58 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 19 Aug 2009 15:58:51 +0000 (15:58 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13883 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm

index 7f2a041..a1850ba 100644 (file)
@@ -42,6 +42,11 @@ sub create_active_events_for_object {
         }
     );
 
+    unless(@$hooks) {
+        $editor->rollback;
+        return undef;
+    }
+
     my %hook_hash = map { ($_->key, $_) } @$hooks;
 
     my $orgs = $editor->json_query({ from => [ 'actor.org_unit_ancestors' => $location ] });