diff options
Diffstat (limited to 'bin/update-all-reports')
-rwxr-xr-x | bin/update-all-reports | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/update-all-reports b/bin/update-all-reports index 0f9231f87..1225a4c08 100755 --- a/bin/update-all-reports +++ b/bin/update-all-reports @@ -39,7 +39,8 @@ if ($opt->table) { } elsif ($opt->all_bodies) { my $bodies = FixMyStreet::DB->resultset("Body")->search({ deleted => 0 }); while (my $body = $bodies->next) { - my $data = FixMyStreet::Script::UpdateAllReports::generate_dashboard($body->id); + next unless $body->body_areas->first; + my $data = FixMyStreet::Script::UpdateAllReports::generate_dashboard($body); output("all-reports-dashboard-" . $body->id, $data); } } elsif (my $body_id = $opt->body) { |