diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-07-02 15:16:27 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-07-08 07:46:23 +0100 |
commit | 002bcf0346adcb6669c236a784752ade896f22ba (patch) | |
tree | c612e1f972bb54748cf10cdd0c7df5c7c520fdad | |
parent | bd92957261cb56961a40e365509c9e65a93ed055 (diff) |
[UK] Ignore Highways England extra data.
If a report is made on a HE road, but it is not to be sent to HE (so the
user has picked it's not on the HE road) and the category name is shared
between council and HE, then the extra HE data (area, road, & sector) is
still saved on the report, and our open311-adapter rejects it due to the
additionnal information present. So make sure we remove this data before
sending.
-rw-r--r-- | perllib/FixMyStreet/Cobrand/EastSussex.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/UKCouncils.pm | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/EastSussex.pm b/perllib/FixMyStreet/Cobrand/EastSussex.pm index 8d95980fe..04394f776 100644 --- a/perllib/FixMyStreet/Cobrand/EastSussex.pm +++ b/perllib/FixMyStreet/Cobrand/EastSussex.pm @@ -20,7 +20,7 @@ sub open311_extra_data { } } $row->detail($row->detail . $text); - return (); + return (undef, ['sect_label', 'road_name', 'area_name']); } sub open311_post_send { diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index f09d4314d..4634f4b14 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -333,6 +333,7 @@ sub open311_extra_data { my $self = shift; my $include = $self->call_hook(open311_extra_data_include => @_); my $exclude = $self->call_hook(open311_extra_data_exclude => @_); + push @$exclude, 'sect_label', 'road_name', 'area_name'; return ($include, $exclude); }; |