diff options
Diffstat (limited to 'perllib/FixMyStreet/SendReport/Zurich.pm')
-rw-r--r-- | perllib/FixMyStreet/SendReport/Zurich.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/SendReport/Zurich.pm b/perllib/FixMyStreet/SendReport/Zurich.pm index 2838440cb..7af4cf4f5 100644 --- a/perllib/FixMyStreet/SendReport/Zurich.pm +++ b/perllib/FixMyStreet/SendReport/Zurich.pm @@ -14,7 +14,7 @@ sub build_recipient_list { # Wunsch set, but external_message hasn't yet been filled in. TODO should # we instead be holding off sending?) if ( $row->external_body ) { - $body = FixMyStreet::App->model("DB::Body")->find( { id => $row->external_body } ); + $body = $row->result_source->schema->resultset("Body")->find( { id => $row->external_body } ); $h->{bodies_name} = $body->name; $h->{external_message} = $row->get_extra_metadata('external_message') || ''; } @@ -29,7 +29,7 @@ sub build_recipient_list { my $parent = $body->parent; if ($parent && !$parent->parent) { # Division, might have an individual contact email address - my $contact = FixMyStreet::App->model("DB::Contact")->find( { + my $contact = $row->result_source->schema->resultset("Contact")->find( { body_id => $body->id, category => $row->category } ); @@ -72,7 +72,7 @@ sub send_from { if ( $row->external_body ) { my $body = @{ $self->bodies }[0]; my $body_email = $body->endpoint; - my $contact = FixMyStreet::App->model("DB::Contact")->find( { + my $contact = $body->result_source->schema->resultset("Contact")->find( { body_id => $body->id, category => $row->category } ); |