diff options
| -rw-r--r-- | perllib/Open311/PopulateServiceList.pm | 19 | 
1 files changed, 15 insertions, 4 deletions
| diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm index a838d0fdd..c47ab143d 100644 --- a/perllib/Open311/PopulateServiceList.pm +++ b/perllib/Open311/PopulateServiceList.pm @@ -44,9 +44,10 @@ sub process_body {          my $id = $self->_current_body->id;          my $mapit_url = mySociety::Config::get('MAPIT_URL');          my $areas = join( ",", keys %{$self->_current_body->areas} ); -        warn "Body $id for areas $areas - $mapit_url/areas/$areas.html - did not return a service list\n" -            if $self->verbose >= 1; -        warn $open311->error; +        if ($self->verbose >= 1) { +            warn "Body $id for areas $areas - $mapit_url/areas/$areas.html - did not return a service list\n"; +            warn $open311->error; +        }          return;      }      $self->process_services( $list ); @@ -248,7 +249,7 @@ sub _add_meta_to_contact {              public_anonymity_required              email_alerts_requested          ) ], -        #2242,  +        #2243,           'Warwickshire County Council' => [qw(              external_id              easting @@ -296,6 +297,16 @@ sub _delete_contacts_not_in_service_list {          }      ); +    # for Warwickshire, which is mixed Open311 and email, don't delete the email +    # addresses +    if ($self->_current_body->name eq 'Warwickshire County Council') { +        $found_contacts = $found_contacts->search( +            { +                email => { -not_like => '%@%' } +            } +        ); +    } +      $found_contacts->update(          {              deleted => 1, | 
