diff options
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Bristol.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/TfL.pm | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bristol.pm b/perllib/FixMyStreet/Cobrand/Bristol.pm index 7e85a3315..5e70c9456 100644 --- a/perllib/FixMyStreet/Cobrand/Bristol.pm +++ b/perllib/FixMyStreet/Cobrand/Bristol.pm @@ -52,7 +52,10 @@ sub categories_restriction { # Email categories with a devolved send_method, so can identify Open311 # categories as those which have a blank send_method. # Also Highways England categories have a blank send_method. - return $rs->search( { 'me.send_method' => undef } ); + return $rs->search( { -or => [ + 'me.send_method' => undef, # Open311 categories + 'me.send_method' => '', # Open311 categories that have been edited in the admin + ] } ); } sub open311_config { diff --git a/perllib/FixMyStreet/Cobrand/TfL.pm b/perllib/FixMyStreet/Cobrand/TfL.pm index c37b9a0e5..9620c6b9e 100644 --- a/perllib/FixMyStreet/Cobrand/TfL.pm +++ b/perllib/FixMyStreet/Cobrand/TfL.pm @@ -437,6 +437,13 @@ sub munge_surrounding_london { # Don't send any TfL categories %$bodies = map { $_->id => $_ } grep { $_->name ne 'TfL' } values %$bodies; } + + # Hackney doesn't have any of the council TfL categories so don't show + # any Hackney categories on red routes + my %bodies = map { $_->name => $_->id } values %$bodies; + if ( $bodies{'Hackney Council'} && $self->report_new_is_on_tlrn ) { + delete $bodies->{ $bodies{'Hackney Council'} }; + } } sub munge_red_route_categories { |