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.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/SendReport/Email.pm b/perllib/FixMyStreet/SendReport/Email.pm
index 95c460006..bc526ded2 100644
--- a/perllib/FixMyStreet/SendReport/Email.pm
+++ b/perllib/FixMyStreet/SendReport/Email.pm
@@ -11,7 +11,7 @@ sub build_recipient_list {
my $all_confirmed = 1;
foreach my $body ( @{ $self->bodies } ) {
- my $contact = FixMyStreet::App->model("DB::Contact")->find( {
+ my $contact = $row->result_source->schema->resultset("Contact")->find( {
deleted => 0,
body_id => $body->id,
category => $row->category
@@ -94,9 +94,7 @@ sub send {
From => $self->send_from( $row ),
};
- my $app = FixMyStreet::App->new( cobrand => $cobrand );
-
- $cobrand->munge_sendreport_params($app, $row, $h, $params) if $cobrand->can('munge_sendreport_params');
+ $cobrand->munge_sendreport_params($row, $h, $params) if $cobrand->can('munge_sendreport_params');
$params->{Bcc} = $self->bcc if @{$self->bcc};