Skip to content

Commit

Permalink
[TfL] Add config for including extra bodies on the site.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Oct 17, 2023
1 parent afe9a33 commit 9a53e98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion perllib/FixMyStreet/Cobrand/TfL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ sub base_url_for_report {

sub categories_restriction {
my ($self, $rs) = @_;
$rs = $rs->search( { 'body.name' => [ 'TfL', 'National Highways' ] } );
my $bodies = $self->feature('categories_restriction_bodies') || [ 'TfL', 'National Highways' ];
$rs = $rs->search( { 'body.name' => $bodies } );

Check warning on line 100 in perllib/FixMyStreet/Cobrand/TfL.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/TfL.pm#L99-L100

Added lines #L99 - L100 were not covered by tests
return $rs unless $self->{c}->stash->{categories_for_point}; # Admin page
return $rs->search( { category => { -not_in => $self->_tfl_no_resend_categories } } );
}
Expand Down

0 comments on commit 9a53e98

Please sign in to comment.