Skip to content

Commit

Permalink
[Waste] Do not save bodies_missing on reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Jul 2, 2024
1 parent 6e724fa commit b595c61
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions perllib/FixMyStreet/App/Controller/Report/New.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,9 @@ sub process_report : Private {
my $areas = $c->stash->{all_areas_mapit};
$report->areas( ',' . join( ',', sort keys %$areas ) . ',' );

my $cobrand_data = $c->stash->{cobrand_data} || '';
$report->cobrand_data($cobrand_data);

if ( $report->category ) {
my @contacts = grep { $_->category eq $report->category } @{$c->stash->{contacts}};
unless ( @contacts ) {
Expand Down Expand Up @@ -1234,7 +1237,7 @@ sub process_report : Private {

$report->bodies_str($body_string);
# Record any body IDs which might have meant to match, but had no contact
if ($body_string ne '-1' && @{ $c->stash->{missing_details_bodies} }) {
if ($cobrand_data ne 'waste' && $body_string ne '-1' && @{ $c->stash->{missing_details_bodies} }) {
my $missing = join( ',', map { $_->id } @{ $c->stash->{missing_details_bodies} } );
$report->bodies_missing($missing);
}
Expand Down Expand Up @@ -1279,7 +1282,6 @@ sub process_report : Private {

# save the cobrand and language related information
$report->cobrand( $c->cobrand->moniker );
$report->cobrand_data( $c->stash->{cobrand_data} || '' );
$report->lang( $c->stash->{lang_code} );

return 1;
Expand Down

0 comments on commit b595c61

Please sign in to comment.