aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Dashboard.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Dashboard.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Dashboard.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm
index 3a66cf1e0..657751e5c 100644
--- a/perllib/FixMyStreet/App/Controller/Dashboard.pm
+++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm
@@ -92,15 +92,18 @@ sub index : Path : Args(0) {
# Set up the data for the dropdowns
- my $council_detail = mySociety::MaPit::call('area', $body->area_id );
+ # Just take the first area ID we find
+ my $area_id = $body->body_areas->first->area_id;
+
+ my $council_detail = mySociety::MaPit::call('area', $area_id );
$c->stash->{council} = $council_detail;
- my $children = mySociety::MaPit::call('area/children', $body->area_id,
+ my $children = mySociety::MaPit::call('area/children', $area_id,
type => $c->cobrand->area_types_children,
);
$c->stash->{children} = $children;
- $c->stash->{all_areas} = { $body->area_id => $council_detail };
+ $c->stash->{all_areas} = { $area_id => $council_detail };
$c->forward( '/report/new/setup_categories_and_bodies' );
# See if we've had anything from the dropdowns