aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-01-25 11:01:48 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-01-25 16:34:51 +0000
commitecc34df634440bd5c00a28b363f77e1819155ffc (patch)
treeca5b5ce05df452d077975528fd9280d45f0ef3f4
parent05ee7835ef04043b52200f6769633847f9b16112 (diff)
[Buckinghamshire] Stop road-placement being sent.
The server doesn't need to know about it, it was only for us to pick the appropriate body.
-rw-r--r--perllib/FixMyStreet/Cobrand/Buckinghamshire.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
index 75564fddd..a96b2b616 100644
--- a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
@@ -90,6 +90,17 @@ sub open311_config {
$row->set_extra_fields(@$extra);
}
+sub open311_pre_send {
+ my ($self, $row, $open311) = @_;
+
+ return unless $row->extra;
+ my $extra = $row->get_extra_fields;
+ if (@$extra) {
+ @$extra = grep { $_->{name} ne 'road-placement' } @$extra;
+ $row->set_extra_fields(@$extra);
+ }
+}
+
sub open311_post_send {
my ($self, $row, $h) = @_;