From: Michael Tremer Date: Tue, 10 Dec 2019 13:01:15 +0000 (+0000) Subject: blog: Fix last publications check if we have posts to be released in the future X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae1da47f79a9a497c8c5dd419af2f4c7e498d36b;p=ipfire.org.git blog: Fix last publications check if we have posts to be released in the future Signed-off-by: Michael Tremer --- diff --git a/src/backend/blog.py b/src/backend/blog.py index ceb438a1..6d2e0ac3 100644 --- a/src/backend/blog.py +++ b/src/backend/blog.py @@ -92,7 +92,7 @@ class Blog(misc.Object): t = datetime.timedelta(**kwargs) res = self.db.get("SELECT COUNT(*) AS count FROM blog \ - WHERE published_at IS NOT NULL AND published_at >= NOW() - %s", t) + WHERE published_at IS NOT NULL AND published_at BETWEEN NOW() - %s AND NOW()", t) if res and res.count > 0: return True