aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
authorM Somerville <matthew-github@dracos.co.uk>2019-06-07 14:25:41 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-06-07 17:16:16 +0100
commit9f82fbb4088e32a3ca636a5ccc1e7495e34e73e5 (patch)
treee96948127aa041161bac617c336345138eb95fac /perllib/FixMyStreet
parent2f6b889481265549a729ad78f63fc8d1660c126f (diff)
[Hounslow] Hide TfL Traffic Lights category.
It is handled by an existing category.
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/Cobrand/FixMyStreet.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
index fb454f495..e01f3e23b 100644
--- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
+++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
@@ -39,6 +39,15 @@ sub restriction {
return {};
}
+sub munge_category_list {
+ my ($self, $options, $contacts, $extras) = @_;
+
+ # No TfL Traffic Lights category in Hounslow
+ my %bodies = map { $_->body->name => 1 } @$contacts;
+ return unless $bodies{'Hounslow Borough Council'};
+ @$options = grep { ($_->{category} || $_->category) !~ /^Traffic lights$/i } @$options;
+}
+
sub title_list {
my $self = shift;
my $areas = shift;