aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2018-01-18 11:36:28 +0000
committerDave Arter <davea@mysociety.org>2018-01-18 12:08:08 +0000
commitfb565accde987917f5d14853d641281830e303fe (patch)
tree477ed873dc417fe1010903720ada4c336a78fa5f
parenta4f9695fe2525a15698fad9da63de6c19c1a5c79 (diff)
[UK] Re-include Bristol in open311-populate-service-list
Bristol's Open311 endpoint still seems to be returning empty metadata for some services that claim to have metadata. They have made changes to their published services since the change was made to exclude their endpoint, which is causing issues for new reports. Rather than exclude their endpoint entirely from being updated, this commit just silences the noisy error message for Bristol. Reverts the change made in 491eb26e4.
-rwxr-xr-xbin/open311-populate-service-list4
-rw-r--r--perllib/Open311/PopulateServiceList.pm3
2 files changed, 4 insertions, 3 deletions
diff --git a/bin/open311-populate-service-list b/bin/open311-populate-service-list
index 8cb41a47b..9c05055c6 100755
--- a/bin/open311-populate-service-list
+++ b/bin/open311-populate-service-list
@@ -23,8 +23,8 @@ my ($opt, $usage) = describe_options(
print($usage->text), exit if $opt->help;
my $bodies = FixMyStreet::DB->resultset('Body')->search( {
- # Until Oxfordshire does, and Bristol stops erroring
- name => { -not_in => [ 'Oxfordshire County Council', 'Bristol City Council' ] },
+ # Until Oxfordshire does
+ name => { -not_in => [ 'Oxfordshire County Council' ] },
send_method => 'Open311'
} );
my $verbose = 0;
diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm
index e8d06efdf..30d888eb4 100644
--- a/perllib/Open311/PopulateServiceList.pm
+++ b/perllib/Open311/PopulateServiceList.pm
@@ -221,7 +221,8 @@ sub _add_meta_to_contact {
warn sprintf( "Empty meta data for %s at %s",
$self->_current_service->{service_code},
$self->_current_body->endpoint )
- if $self->verbose;
+ # Bristol has a habit of returning empty metadata, stop noise from that.
+ if $self->verbose and $self->_current_body->name ne 'Bristol City Council';
return;
}