aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script/Questionnaires.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-08-31 16:15:46 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-08-31 16:15:46 +0100
commitcec5c77a4207b341947affed8e6e8e57ec29965d (patch)
tree246900550b394f956a8ac4bd76ffbe943cc8fb1e /perllib/FixMyStreet/Script/Questionnaires.pm
parentc590981f0c198fa0491801a312a65eed054a0778 (diff)
parent51a5bcc74982aefea4f7b364e2f4bc49596bd9bf (diff)
Merge branch 'move-report-states-to-database'
Diffstat (limited to 'perllib/FixMyStreet/Script/Questionnaires.pm')
-rw-r--r--perllib/FixMyStreet/Script/Questionnaires.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Script/Questionnaires.pm b/perllib/FixMyStreet/Script/Questionnaires.pm
index 3f22eb150..ec6139d2d 100644
--- a/perllib/FixMyStreet/Script/Questionnaires.pm
+++ b/perllib/FixMyStreet/Script/Questionnaires.pm
@@ -16,6 +16,9 @@ sub send {
sub send_questionnaires_period {
my ( $period, $params ) = @_;
+ # Don't send if we don't have a fixed state
+ return unless FixMyStreet::DB::Result::Problem::fixed_states->{fixed};
+
my $rs = FixMyStreet::DB->resultset('Questionnaire');
# Select all problems that need a questionnaire email sending