need the full hook, not just idlist
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 1 Feb 2009 21:34:34 +0000 (21:34 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 1 Feb 2009 21:34:34 +0000 (21:34 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12038 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 04d8dd3..f694217 100644 (file)
@@ -35,19 +35,18 @@ sub create_events_for_object {
 
     my $editor = new_editor(xact=>1);
 
-    my $hooks = $editor->search_action_trigger_hook([
+    my $hooks = $editor->search_action_trigger_hook(
         { key       => $key,
           core_type => $target->json_hint
-        },
-        { idlist    => 1 }
-    ]);
+        }
+    );
 
     my %hook_hash = map { ($_->id, $_) } @$hooks;
 
     my $orgs = $editor->json_query({ from => [ 'actor.org_unit_ancestors' => $location ] });
     my $defs = $editor->search_action_trigger_event_definition([
-        { hook   => $hooks,
-          owner  => [ map { $_->{id} } @$orgs ],
+        { hook   => [ map { $_->id   } @$hooks ],
+          owner  => [ map { $_->{id} } @$orgs  ],
           active => 't'
         },
         { idlist => 1 }