diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-05-26 13:45:24 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-05-26 13:45:24 +0100 |
commit | 565b32d48bb364ec7097faff01a2eabb336e72c9 (patch) | |
tree | 108763e0db6227b874084c823a8602d200c7cda9 /perllib/FixMyStreet/App/Controller/Report/Update.pm | |
parent | 83bc0e1ef5b99b1ffc1e77fe6a8eaccae146806a (diff) | |
parent | 9e7c44777e9fbcbef6be463b4a7a1dc9b20d90f1 (diff) |
Merge branch 'issues/forcouncils/191-action-scheduled-instruct'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/Update.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/Update.pm | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm index 6e94547f3..81a50dfa2 100644 --- a/perllib/FixMyStreet/App/Controller/Report/Update.pm +++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm @@ -286,8 +286,6 @@ sub process_update : Private { } if ( $params{state} ) { - $params{state} = 'fixed - council' - if $params{state} eq 'fixed' && $c->user && $c->user->belongs_to_body( $update->problem->bodies_str ); $update->problem_state( $params{state} ); } else { # we do this so we have a record of the state of the problem at this point @@ -344,14 +342,10 @@ sub check_for_errors : Private { my ( $self, $c ) = @_; # they have to be an authority user to update the state - if ( $c->get_param('state') ) { + if ( my $state = $c->get_param('state') ) { my $error = 0; $error = 1 unless $c->user && $c->user->belongs_to_body( $c->stash->{update}->problem->bodies_str ); - - my $state = $c->get_param('state'); - $state = 'fixed - council' if $state eq 'fixed'; - $error = 1 unless ( grep { $state eq $_ } ( FixMyStreet::DB::Result::Problem->council_states() ) ); - + $error = 1 unless grep { $state eq $_ } FixMyStreet::DB::Result::Problem->council_states(); if ( $error ) { $c->stash->{errors} ||= []; push @{ $c->stash->{errors} }, _('There was a problem with your update. Please try again.'); |