aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Whiteland <dave@mysociety.org>2012-05-03 14:29:49 +0100
committerDave Whiteland <dave@mysociety.org>2012-05-03 14:29:49 +0100
commit64e3ba94a9d1e2fdfbe186bd39e0e0fc85da6768 (patch)
treea6e771919c60585e7bec5e7813daa054da8cdbc7
parent9ff1f11f7c899ce121e49a970c84c043fb1d2526 (diff)
catch council_config's send_method returning undef and ignore it
-rwxr-xr-xbin/send-reports2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/send-reports b/bin/send-reports
index 174bb2cbf..5842e1694 100755
--- a/bin/send-reports
+++ b/bin/send-reports
@@ -159,7 +159,7 @@ while (my $row = $unsent->next) {
# look in the DB to determine if there is a special handler for this council (e.g., open311, or custom)
my $council_config = FixMyStreet::App->model("DB::Open311conf")->search( { area_id => $council} )->first;
- $send_method = $council_config->send_method if $council_config;
+ $send_method = $council_config->send_method if ($council_config and $council_config->send_method);
if ($council == COUNCIL_ID_EAST_HANTS) { # E. Hants have a web service
$send_method = SEND_METHOD_EAST_HANTS; # TODO: delete? should be in the db
$h{category} = 'Customer Services' if $h{category} eq 'Other';