aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/SendReport/Email.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/SendReport/Email.pm')
-rw-r--r--perllib/FixMyStreet/SendReport/Email.pm5
1 files changed, 1 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm
index 679530507..6cd9afccd 100644
--- a/perllib/FixMyStreet/SendReport/Email.pm
+++ b/perllib/FixMyStreet/SendReport/Email.pm
@@ -12,10 +12,7 @@ sub build_recipient_list {
my $all_confirmed = 1;
foreach my $body ( @{ $self->bodies } ) {
- my $contact = $row->result_source->schema->resultset("Contact")->not_deleted->find( {
- body_id => $body->id,
- category => $row->category
- } );
+ my $contact = $self->fetch_category($body, $row) or next;
my ($body_email, $state, $note) = ( $contact->email, $contact->state, $contact->note );