aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-09-23 15:25:04 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-10-04 15:05:58 +0100
commit80de03a6b15aa1e16cb7169831adcf65829a1120 (patch)
treef29caeaa7690c0e2176dff3766995e21d55ab6cd
parent834567d39ee64b3e352c9f30a522d017d74e7239 (diff)
Don't show deleted bodies on /reports.
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index ddc75163a..49f477fec 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -55,7 +55,9 @@ sub index : Path : Args(0) {
}
# Fetch all bodies
- my @bodies = $c->model('DB::Body')->search({}, {
+ my @bodies = $c->model('DB::Body')->search({
+ deleted => 0,
+ }, {
'+select' => [ { count => 'area_id' } ],
'+as' => [ 'area_count' ],
join => 'body_areas',