diff options
author | Struan Donald <struan@exo.org.uk> | 2019-09-30 16:17:26 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2019-09-30 17:26:42 +0100 |
commit | 977a546cd51fa0e9d88451dcdfe59c68c9017e8d (patch) | |
tree | 968b7b3ccda0072aca7101fbc2cf51a8e425c689 | |
parent | 9b40321e0b641c046dbd642ad600cce83fbba8a3 (diff) |
[IsleOfWight] hide reports created before go live
-rw-r--r-- | perllib/FixMyStreet/Cobrand/IsleOfWight.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/IsleOfWight.pm b/perllib/FixMyStreet/Cobrand/IsleOfWight.pm index 49356e3ae..753ac3b72 100644 --- a/perllib/FixMyStreet/Cobrand/IsleOfWight.pm +++ b/perllib/FixMyStreet/Cobrand/IsleOfWight.pm @@ -45,6 +45,17 @@ sub updates_disallowed { return 1; } +# Island Roads don't want any reports made before their go-live date visible on +# their cobrand at all. +sub problems_restriction { + my ($self, $rs) = @_; + return $rs if FixMyStreet->config('STAGING_SITE') or FixMyStreet->test_mode; + my $table = ref $rs eq 'FixMyStreet::DB::ResultSet::Nearby' ? 'problem' : 'me'; + return $rs->to_body($self->body)->search({ + "$table.confirmed" => { '>=', '2019-09-30' } + }); +} + sub get_geocoder { 'OSM' } sub open311_pre_send { |