diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-04-14 11:38:25 +0100 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-04-14 11:38:25 +0100 |
commit | 1031d78748f88c57d78fb79cb6771ab698b7d284 (patch) | |
tree | aa501b5ff025158f0a97ade0d87664a6792d2f79 /perllib/FixMyStreet/App/Controller/Around.pm | |
parent | 998a7b4aa08b9b4f5f857ad652d6f3f90eec076b (diff) |
Fim report creation tests
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Around.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Around.pm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm index 0c6db66be..ae0976de8 100644 --- a/perllib/FixMyStreet/App/Controller/Around.pm +++ b/perllib/FixMyStreet/App/Controller/Around.pm @@ -226,7 +226,7 @@ sub determine_location_from_pc : Private { } # pass errors back to the template - $c->stash->{pc_error} = $error; + $c->stash->{location_error} = $error; return; } @@ -258,13 +258,14 @@ sub check_location_is_acceptable : Private { ) if $@; } - # all good - return 1 if !$error_msg; - # show error - $c->stash->{pc_error} = $error_msg; - return; + if ($error_msg) { + $c->stash->{location_error} = $error_msg; + return; + } + # check that there are councils that can accept this location + return $c->forward('/report/new/load_and_check_councils'); } __PACKAGE__->meta->make_immutable; |