diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/Script/Reports.pm | 1 | ||||
-rw-r--r-- | t/app/sendreport/inspection_required.t | 3 |
3 files changed, 2 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f37ca7088..6d863cc9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Fix JavaScript error on /my calculating bounds #1954 - Change text on /reports to match lower down (fix translation). - Ensure all reports graph can't dip downward. #1956 + - Fix error sending `requires_inspection` reports. #1961 - UK: - Lazy load images in the footer. diff --git a/perllib/FixMyStreet/Script/Reports.pm b/perllib/FixMyStreet/Script/Reports.pm index 04ad1c893..aca894d03 100644 --- a/perllib/FixMyStreet/Script/Reports.pm +++ b/perllib/FixMyStreet/Script/Reports.pm @@ -45,6 +45,7 @@ sub send(;$) { while (my $row = $unsent->next) { my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker($row->cobrand)->new(); + FixMyStreet::DB->schema->cobrand($cobrand); if ($debug_mode) { $debug_unsent_count++; diff --git a/t/app/sendreport/inspection_required.t b/t/app/sendreport/inspection_required.t index 03c7ff944..64d6f70ee 100644 --- a/t/app/sendreport/inspection_required.t +++ b/t/app/sendreport/inspection_required.t @@ -5,9 +5,6 @@ use FixMyStreet::Script::Reports; ok( my $mech = FixMyStreet::TestMech->new, 'Created mech object' ); -use_ok 'FixMyStreet::Cobrand'; -FixMyStreet::DB->schema->cobrand(FixMyStreet::Cobrand::FixMyStreet->new()); - my $user = $mech->create_user_ok( 'user@example.com' ); my $body = $mech->create_body_ok( 2237, 'Oxfordshire County Council'); |