From 7fc2df6334c0c9f20c9b10a98f29651295785938 Mon Sep 17 00:00:00 2001 From: Frisk Date: Sun, 22 Sep 2024 21:17:51 +0200 Subject: [PATCH] Probably better solution than the previous one --- src/discussions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discussions.py b/src/discussions.py index be8750c..a31da87 100644 --- a/src/discussions.py +++ b/src/discussions.py @@ -139,7 +139,7 @@ class Discussions: # "Exception in feed formatter", # Post=str(post)[0:1000], Wiki=wiki.script_url) messagequeue.add_messages(message_list) - if message_list: + if discussion_feed and discussion_feed[-1]["id"] > wiki.discussion_id: wiki.statistics.update(last_post=discussion_feed[-1]["id"]) dbmanager.add(("UPDATE rcgcdb SET postid = $1 WHERE wiki = $2 AND ( postid != '-1' OR postid IS NULL )", (str(discussion_feed[-1]["id"]), wiki.script_url))) # If this is not enough for the future, save rcid in message sending function to make sure we always send all of the changes