aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-03-28 10:52:02 +0100
committerStruan Donald <struan@exo.org.uk>2012-03-28 10:52:02 +0100
commit762a6adf15dbea09c234bf97c68ad7a87c83d463 (patch)
tree909e527d18db8e01c277d1d11b4dcb3ea4af61ae
parenta2c1914f4d695efe708d2b4e7a9f828cd77ea39b (diff)
make sure we send the report if we are emailing
-rwxr-xr-xbin/send-reports4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/send-reports b/bin/send-reports
index 625fb8b2f..4181ba17e 100755
--- a/bin/send-reports
+++ b/bin/send-reports
@@ -171,7 +171,7 @@ while (my $row = $unsent->next) {
$send_email = 1 unless $send_method; # default to email if nothing explicit was provided
# currently: open311 without an endpoint is useless, so check the endpoint is set
- if ($send_method eq SEND_METHOD_OPEN311) {
+ if ($send_method && $send_method eq SEND_METHOD_OPEN311) {
if ($council_config->endpoint) {
if ($send_method eq SEND_METHOD_OPEN311) {
push @open311_councils, $council_config;
@@ -240,7 +240,7 @@ while (my $row = $unsent->next) {
}
- unless ($send_method) {
+ unless ($send_method || $send_email) {
die 'Report not going anywhere for ID ' . $row->id . '!';
}