Fix bug in e-mail scheduling

This commit is contained in:
Kailash Nadh 2020-03-08 15:29:53 +05:30
parent 68c4ccdefc
commit 07856d34a2
1 changed files with 1 additions and 1 deletions

View File

@ -442,7 +442,7 @@ WITH camps AS (
SELECT campaigns.*, COALESCE(templates.body, (SELECT body FROM templates WHERE is_default = true LIMIT 1)) AS template_body
FROM campaigns
LEFT JOIN templates ON (templates.id = campaigns.template_id)
WHERE (status='running' OR (status='scheduled' AND campaigns.send_at >= NOW()))
WHERE (status='running' OR (status='scheduled' AND NOW() >= campaigns.send_at))
AND NOT(campaigns.id = ANY($1::INT[]))
),
campLists AS (