aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script/Questionnaires.pm
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2020-09-29 14:23:52 +0200
committerMarius Halden <marius.h@lden.org>2020-09-29 14:23:52 +0200
commita27ce1524d801d2742a2bdb6ec1da45126d64353 (patch)
tree64123c4e17dc1776aa0a7cd65ee01d49d3e7d978 /perllib/FixMyStreet/Script/Questionnaires.pm
parent377bd96aab7cad3434185c30eb908c9da447fe40 (diff)
parent2773c60226b9370fe8ee00f7b205b571bb87c3b5 (diff)
Merge tag 'v3.0.1' into fiksgatami-dev
Diffstat (limited to 'perllib/FixMyStreet/Script/Questionnaires.pm')
-rw-r--r--perllib/FixMyStreet/Script/Questionnaires.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Script/Questionnaires.pm b/perllib/FixMyStreet/Script/Questionnaires.pm
index aab4b9b75..5db66ff7c 100644
--- a/perllib/FixMyStreet/Script/Questionnaires.pm
+++ b/perllib/FixMyStreet/Script/Questionnaires.pm
@@ -33,8 +33,8 @@ sub send_questionnaires_period {
};
$q_params->{'-or'} = [
- '(select max(whensent) from questionnaire where me.id=problem_id)' => undef,
- '(select max(whenanswered) from questionnaire where me.id=problem_id)' => { '<', \"current_timestamp - '$period'::interval" }
+ \'(select max(whensent) from questionnaire where me.id=problem_id) IS NULL',
+ \"(select max(whenanswered) from questionnaire where me.id=problem_id) < current_timestamp - '$period'::interval",
];
my $unsent = FixMyStreet::DB->resultset('Problem')->search( $q_params, {