From 4f3c5d42d3ea2d669fbb32a32954c4451adcb6a5 Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Tue, 11 Jul 2017 13:04:32 +0200 Subject: [PATCH] TT#16933 ngcp fraud notify events with no emails * skip the email send part for events where "interval_notify" undef/empty Change-Id: I7f5bf651ec8c019ab5d7560fda10c0a2c4f4f6fa (cherry picked from commit 85c434e16923ba2ab2fb88835338a09942751682) --- bin/ngcp-fraud-auto-lock | 8 +++++--- bin/ngcp-fraud-daily-lock | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bin/ngcp-fraud-auto-lock b/bin/ngcp-fraud-auto-lock index b13270a..1276f87 100755 --- a/bin/ngcp-fraud-auto-lock +++ b/bin/ngcp-fraud-auto-lock @@ -185,9 +185,11 @@ sub main { if (defined $event->{interval_lock} && $event->{interval_lock} > 0) { lock_customer($event, $subscribers); } - eval { - send_email($event, $subscribers); - }; + if ($event->{interval_notify}) { + eval { + send_email($event, $subscribers); + }; + } print $EVAL_ERROR if $EVAL_ERROR; } return; diff --git a/bin/ngcp-fraud-daily-lock b/bin/ngcp-fraud-daily-lock index 2d73f2d..1820bd0 100755 --- a/bin/ngcp-fraud-daily-lock +++ b/bin/ngcp-fraud-daily-lock @@ -185,9 +185,11 @@ sub main { if (defined $event->{interval_lock} && $event->{interval_lock} > 0) { lock_customer($event, $subscribers); } - eval { - send_email($event, $subscribers); - }; + if ($event->{interval_notify}) { + eval { + send_email($event, $subscribers); + }; + } print $EVAL_ERROR if $EVAL_ERROR; } return;