diff options
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FixMyStreet.pm | 9 |
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; |