aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-08-10 10:30:16 +0100
committerMatthew Somerville <matthew@mysociety.org>2016-08-10 10:30:16 +0100
commitba55ebdb6fa87f7772a539a139bef0a16879d757 (patch)
tree6605a45f5d95379a8d89372626c30108b2ee0810 /perllib/FixMyStreet/Script
parent1a290e7812432acab20e21a30f66a1b00e683bce (diff)
Do not send alerts for hidden reports.
Fixes #1461.
Diffstat (limited to 'perllib/FixMyStreet/Script')
-rw-r--r--perllib/FixMyStreet/Script/Alerts.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Script/Alerts.pm b/perllib/FixMyStreet/Script/Alerts.pm
index 91f5cd6ef..65183c09c 100644
--- a/perllib/FixMyStreet/Script/Alerts.pm
+++ b/perllib/FixMyStreet/Script/Alerts.pm
@@ -83,6 +83,8 @@ sub send() {
# this is for the new_updates alerts
next if $row->{non_public} and $row->{user_id} != $row->{alert_user_id};
+ next unless FixMyStreet::DB::Result::Problem::visible_states()->{$row->{state}};
+
$schema->resultset('AlertSent')->create( {
alert_id => $row->{alert_id},
parameter => $row->{item_id},