diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-01-13 10:25:24 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-01-13 10:25:24 +0000 |
commit | 1750fb706ff9a88b3d3ddee78333ecb5f8d66cef (patch) | |
tree | d1647592e504c5204e18573eb6e076ff8add385d /perllib/FixMyStreet/Cobrand/TfL.pm | |
parent | eea513cc0ffc4f494f5adec0b8032f661a75a789 (diff) | |
parent | 197c942e43eed14268f684151b0f088d926cf588 (diff) |
Merge branch 'tfl-no-resend'
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/TfL.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/TfL.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/TfL.pm b/perllib/FixMyStreet/Cobrand/TfL.pm index 797b872a4..e32711a02 100644 --- a/perllib/FixMyStreet/Cobrand/TfL.pm +++ b/perllib/FixMyStreet/Cobrand/TfL.pm @@ -83,7 +83,9 @@ sub base_url_for_report { sub categories_restriction { my ($self, $rs) = @_; - return $rs->search( { 'body.name' => 'TfL' } ); + $rs = $rs->search( { 'body.name' => 'TfL' } ); + return $rs unless $self->{c}->stash->{categories_for_point}; # Admin page + return $rs->search( { category => { -not_in => $self->_tfl_no_resend_categories } } ); } sub admin_user_domain { 'tfl.gov.uk' } @@ -498,4 +500,10 @@ sub _cleaning_groups { [ 'Street cleaning' ] } sub _tfl_council_category { 'General Litter / Rubbish Collection' } +sub _tfl_no_resend_categories { [ + 'General Litter / Rubbish Collection', + 'Other (TfL)', + 'Timings', +] } + 1; |