diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-03 22:18:05 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-03 22:18:05 +0100 |
commit | b019beb393534919c249fa16e7ab07ac63fa52c5 (patch) | |
tree | d2dd1a1a97246c7bce6814f84ec09cd341301b6e /perllib/FixMyStreet/App/Controller/Report/Update.pm | |
parent | 5d2261eb81e9e28bbaa1f52c668be164bb7a597d (diff) |
Fix bug whereby lat/lon were being stored the wrong way round in local alerts.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/Update.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/Update.pm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm index eadf2beea..a1120470b 100644 --- a/perllib/FixMyStreet/App/Controller/Report/Update.pm +++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm @@ -315,12 +315,15 @@ sub signup_for_alerts : Private { my ( $self, $c ) = @_; if ( $c->stash->{add_alert} ) { + my $update = $c->stash->{update}; my $alert = $c->model('DB::Alert')->find_or_create( - user => $c->stash->{update}->user, - alert_type => 'new_updates', - parameter => $c->stash->{update}->problem_id, - confirmed => 1, - ); + user => $update->user, + alert_type => 'new_updates', + parameter => $update->problem_id, + cobrand => $update->cobrand, + cobrand_data => $update->cobrand_data, + lang => $update->lang, + )->confirm(); $alert->update; } |