diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 3 | ||||
-rw-r--r-- | t/Mock/MapIt.pm | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 7b4f1abad..7468b0041 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -918,6 +918,7 @@ sub process_report : Private { # set these straight from the params $report->category( _ $params{category} ) if $params{category}; + $c->cobrand->call_hook(report_new_munge_category => $report); $report->subcategory( $params{subcategory} ); my $areas = $c->stash->{all_areas_mapit}; @@ -1351,6 +1352,8 @@ sub save_user_and_report : Private { $c->log->info($report->user->id . ' exists, but is not logged in for this report'); } + $c->cobrand->call_hook(report_new_munge_before_insert => $report); + $report->update_or_insert; # tidy up diff --git a/t/Mock/MapIt.pm b/t/Mock/MapIt.pm index 1e94bb3e6..c57f7e0ed 100644 --- a/t/Mock/MapIt.pm +++ b/t/Mock/MapIt.pm @@ -23,6 +23,7 @@ sub output { } my @PLACES = ( + [ '?', 53.387402, -2.943997, 2527, 'Liverpool City Council', 'MTD' ], [ 'EH1 1BB', 55.952055, -3.189579, 2651, 'Edinburgh City Council', 'UTA', 20728, 'City Centre', 'UTE' ], [ 'BS10 5EE', 51.494885, -2.602237, 2561, 'Bristol City Council', 'UTA', 148646, 'Bedminster', 'UTW' ], [ 'SW1A 1AA', 51.501009, -0.141588, 2504, 'Westminster City Council', 'LBO' ], |