From 0b1816aa94bdeff150d4c2272ab6aab7c46e8f3e Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 11 Nov 2009 00:05:35 +0000 Subject: [PATCH] when creating events, filter the defs on granularity if the user requested that; do not add granularity to the event object, it has no such field git-svn-id: svn://svn.open-ils.org/ILS/trunk@14862 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm b/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm index 367fd046c5..702d7ff520 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm @@ -367,6 +367,7 @@ sub create_batch_events { } for my $def ( @$defs ) { + next if ($granularity && $def->granularity ne $granularity ); my $date = DateTime->now->subtract( seconds => interval_to_seconds($def->delay) ); @@ -433,7 +434,6 @@ sub create_batch_events { $event->target( $o_id ); $event->event_def( $def->id ); $event->run_time( $run_time ); - $event->granularity($granularity) if (defined $granularity); $editor->create_action_trigger_event( $event ); -- 2.11.0