aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Dashboard.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-01-02 12:25:50 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-01-03 14:22:30 +0000
commitc900b5057c6d3a9c389a0d0ac8524ab2e3abd8f8 (patch)
tree02b49c7f2705ae733b7a12006c60a235fb5ebf27 /perllib/FixMyStreet/App/Controller/Dashboard.pm
parent39e549b3e1978cc5d6b29ba37f57ca90d3c391cb (diff)
Add some new Body model helper methods.
And use the existing ones more.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Dashboard.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Dashboard.pm6
1 files changed, 1 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm
index 926e941f6..7a6e82093 100644
--- a/perllib/FixMyStreet/App/Controller/Dashboard.pm
+++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm
@@ -86,11 +86,7 @@ sub index : Path : Args(0) {
if ($body) {
$c->stash->{body_name} = $body->name;
- my $area_id = $body->body_areas->first->area_id;
- my $children = mySociety::MaPit::call('area/children', $area_id,
- type => $c->cobrand->area_types_children,
- );
- $c->stash->{children} = $children;
+ my $children = $c->stash->{children} = $body->first_area_children;
$c->forward('/admin/fetch_contacts');
$c->stash->{contacts} = [ $c->stash->{contacts}->all ];