diff options
author | Struan Donald <struan@exo.org.uk> | 2011-10-21 13:22:56 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-10-21 13:22:56 +0100 |
commit | 2d759ea59de094614a7241a50e2874c09f2a83c4 (patch) | |
tree | 14285410af096debecb3095e9d87a427db3a190b | |
parent | d5b4a0e16b7f1fa80f49c923a063e769fdad26f5 (diff) |
check that there is an open311 endpoint configured before using open311
-rwxr-xr-x | bin/send-reports | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/send-reports b/bin/send-reports index b2820b750..648e83192 100755 --- a/bin/send-reports +++ b/bin/send-reports @@ -137,7 +137,7 @@ while (my $row = $unsent->next) { $h{category} = 'Customer Services' if $h{category} eq 'Other'; } elsif ($areas_info->{$council}->{type} eq 'LBO') { # London $send_web = 'london'; - } elsif ( my $endpoint = FixMyStreet::App->model("DB::Open311conf")->find( { area_id => $council } ) ) { + } elsif ( my $endpoint = FixMyStreet::App->model("DB::Open311conf")->search( { area_id => $council, endpoint => { '!=', '' } } )->first ) { push @open311_councils, $endpoint; $send_web = 'open311'; } else { |