diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-02-04 09:10:01 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-02-04 09:10:01 +0000 |
commit | 25602483f3d4a1bbff76b52a1cbd314198b2b7c2 (patch) | |
tree | 6db98f219484b5e7abb945c25952727014ef672d | |
parent | d75bd4db62979ca208eadbafedb2d1dd4ac5fe1a (diff) |
Check we have an area ID to look up first.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index ef7410962..c3a6003c6 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -132,7 +132,7 @@ sub ward : Path : Args(2) { # List of wards # Ignore external_body special body thing - unless ($c->stash->{ward} || !$c->stash->{body}->id) { + if ( !$c->stash->{ward} && $c->stash->{body}->id && $c->stash->{body}->body_areas->first ) { my $children = mySociety::MaPit::call('area/children', [ $c->stash->{body}->body_areas->first->area_id ], type => $c->cobrand->area_types_children, ); |