aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Council.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-07-13 10:55:41 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-07-13 11:39:13 +0100
commitdf59d7dbefa36b66c427f1d33f6392f1a3c209f5 (patch)
treea63913750ea868221e1192918d68a94d4c9be886 /perllib/FixMyStreet/App/Controller/Council.pm
parent02d06df3644d53aaa2611882491230fc28d843bd (diff)
Remove various UK specific code out of Default cobrand into UK one.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Council.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Council.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Council.pm b/perllib/FixMyStreet/App/Controller/Council.pm
index 771603c22..b513ac930 100644
--- a/perllib/FixMyStreet/App/Controller/Council.pm
+++ b/perllib/FixMyStreet/App/Controller/Council.pm
@@ -23,7 +23,7 @@ there are no councils then return false.
sub load_and_check_councils_and_wards : Private {
my ( $self, $c ) = @_;
- my @area_types = ( $c->cobrand->area_types(), @$mySociety::VotingArea::council_child_types );
+ my @area_types = ( $c->cobrand->area_types(), $c->cobrand->area_types_children() );
$c->stash->{area_types} = \@area_types;
$c->forward('load_and_check_councils');
}
@@ -69,6 +69,10 @@ sub load_and_check_councils : Private {
mySociety::MaPit::call( 'point', "4326/$short_longitude,$short_latitude",
type => \@area_types );
}
+ if ($all_councils->{error}) {
+ $c->stash->{location_error} = $all_councils->{error};
+ return;
+ }
# Let cobrand do a check
my ( $success, $error_msg ) =