diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-12-13 11:35:57 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-12-13 12:31:43 +0000 |
commit | fbd8ab7302c353bac71c220ad77ef6c7a280dbc5 (patch) | |
tree | 6d6d168ac17a4bc2412d841069182a2d572565ac | |
parent | ea9d9fc2aa0bd2a89bcbe8198d1ecf57f404a9c5 (diff) |
[fixmystreet.com] Ignore TfL-cobrand-only category.
-rw-r--r-- | perllib/FixMyStreet/Cobrand/TfL.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Cobrand/TfL.pm b/perllib/FixMyStreet/Cobrand/TfL.pm index b8c03c7a9..e76113b9a 100644 --- a/perllib/FixMyStreet/Cobrand/TfL.pm +++ b/perllib/FixMyStreet/Cobrand/TfL.pm @@ -390,7 +390,7 @@ sub munge_red_route_categories { my ($self, $options, $contacts) = @_; if ( $self->report_new_is_on_tlrn ) { # We're on a red route - only send TfL categories (except the disabled - # one that directs the user to borough for street cleaning XXX TODO: make sure this is included when on the TfL cobrand) and borough + # one that directs the user to borough for street cleaning) and borough # street cleaning categories. my %cleaning_cats = map { $_ => 1 } @{ $self->_cleaning_categories }; @$contacts = grep { @@ -400,8 +400,9 @@ sub munge_red_route_categories { } @$contacts; } else { # We're not on a red route - send all categories except - # TfL red-route-only. + # TfL red-route-only and the TfL street cleaning. my %tlrn_cats = map { $_ => 1 } @{ $self->_tlrn_categories }; + $tlrn_cats{$self->_tfl_council_category} = 1; @$contacts = grep { !( $_->body->name eq 'TfL' && $tlrn_cats{$_->category } ) } @$contacts; } my $seen = { map { $_->category => 1 } @$contacts }; |