aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Alert.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Alert.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Alert.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm
index 2698c6ac0..4407e06ce 100644
--- a/perllib/FixMyStreet/App/Controller/Alert.pm
+++ b/perllib/FixMyStreet/App/Controller/Alert.pm
@@ -191,7 +191,11 @@ sub create_alert : Private {
$alert->insert();
}
- $alert->confirm() if $c->user && $c->user->id == $alert->user->id;
+ if ( $c->user && $c->user->id == $alert->user->id ) {
+ $alert->confirm();
+ } else {
+ $alert->confirmed(0);
+ }
$c->stash->{alert} = $alert;
}