keys is more efficient than map, since we already have the id list as the hash keys
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 1 Feb 2009 21:35:44 +0000 (21:35 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 1 Feb 2009 21:35:44 +0000 (21:35 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12039 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index f694217..dc18147 100644 (file)
@@ -45,7 +45,7 @@ sub create_events_for_object {
 
     my $orgs = $editor->json_query({ from => [ 'actor.org_unit_ancestors' => $location ] });
     my $defs = $editor->search_action_trigger_event_definition([
-        { hook   => [ map { $_->id   } @$hooks ],
+        { hook   => [ keys %hook_hash ],
           owner  => [ map { $_->{id} } @$orgs  ],
           active => 't'
         },