aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2019-08-08 15:33:31 +0100
committerDave Arter <davea@mysociety.org>2019-08-18 20:30:22 +0100
commit2de5f6d20e8aed1c173f93a3265fd23de578b5c8 (patch)
treef07ed62c0d499fd5efa7d2498075deb7968306f6 /perllib
parentfb26467ee1c49dae6b46e93757d4b19903676bd8 (diff)
[Westminster] Disallow TfL categories on cobrand
Also tidies up the categories_restriction query for Northamptonshire.
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/Cobrand/Northamptonshire.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Westminster.pm8
2 files changed, 9 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
index 533dad5d3..f16700820 100644
--- a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
@@ -27,7 +27,7 @@ sub disambiguate_location {
sub categories_restriction {
my ($self, $rs) = @_;
- return $rs->search( [ { 'body.name' => 'Northamptonshire County Council' } ], { join => { body => 'body_areas' } });
+ return $rs->search( { 'body.name' => 'Northamptonshire County Council' }, { join => 'body' });
}
sub send_questionnaires { 0 }
diff --git a/perllib/FixMyStreet/Cobrand/Westminster.pm b/perllib/FixMyStreet/Cobrand/Westminster.pm
index 3d99e59c4..dc8765bae 100644
--- a/perllib/FixMyStreet/Cobrand/Westminster.pm
+++ b/perllib/FixMyStreet/Cobrand/Westminster.pm
@@ -145,4 +145,12 @@ sub _fetch_features_url {
return $cfg->{proxy_url} . "?" . $uri->as_string;
}
+sub categories_restriction {
+ my ($self, $rs) = @_;
+ # Westminster don't want TfL categories on their cobrand
+ # XXX This still shows "These will be sent to TfL or Westminster City Council"
+ # on /report/new before a category is selected...
+ return $rs->search( { 'body.name' => 'Westminster City Council' }, { join => 'body' });
+}
+
1;