Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Automatically switch scheduled campaigns to `draft` when `send_at` date it removed.

Kailash Nadh5ba0adcb0b15
diff --git a/queries.sql b/queries.sql
index 39071d2d..7772fce7 100644
--- a/queries.sql
+++ b/queries.sql
@@ -830,6 +830,12 @@ WITH camp AS (
altbody=(CASE WHEN $6 = '' THEN NULL ELSE $6 END),
content_type=$7::content_type,
send_at=$8::TIMESTAMP WITH TIME ZONE,
+ status=(
+ CASE
+ WHEN status = 'scheduled' AND $8 IS NULL THEN 'draft'
+ ELSE status
+ END
+ ),
headers=$9,
tags=$10::VARCHAR(100)[],
messenger=$11,