Fix bug in e-mail scheduling
This commit is contained in:
parent
68c4ccdefc
commit
07856d34a2
|
@ -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 (
|
||||
|
|
Loading…
Reference in New Issue