aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report/New.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-02-27 07:39:46 +0000
committerMatthew Somerville <matthew@mysociety.org>2020-02-27 07:39:46 +0000
commitb0b6810e372a154b1af7da72c1bd2143e5e251e9 (patch)
tree1ebbc91b59f8822e483e51f1f486c347718b0e65 /perllib/FixMyStreet/App/Controller/Report/New.pm
parent152f8f4e608abc5029104e652f4ef37d4cfe02cb (diff)
parent18adbe946c1104338e6abff159b4f9877154969c (diff)
Merge branch 'admin-only-categories'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/New.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm6
1 files changed, 1 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 14aa7b83e..ef1905c98 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -690,11 +690,7 @@ sub setup_categories_and_bodies : Private {
$c->cobrand->call_hook(munge_report_new_bodies => \%bodies);
- my $contacts #
- = $c #
- ->model('DB::Contact') #
- ->active
- ->search( { 'me.body_id' => [ keys %bodies ] }, { prefetch => 'body' } );
+ my $contacts = $c->model('DB::Contact')->for_new_reports($c, \%bodies);
my @contacts = $c->cobrand->categories_restriction($contacts)->all_sorted;
$c->cobrand->call_hook(munge_report_new_contacts => \@contacts);