From 9e5166e17a9e717524f9f489756c2a90f30161db Mon Sep 17 00:00:00 2001 From: Frisk Date: Fri, 20 Nov 2020 17:14:37 +0100 Subject: [PATCH] Depend on only postid being -1 for disabled Discussion checking --- src/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bot.py b/src/bot.py index a0b0fac..509a1b9 100644 --- a/src/bot.py +++ b/src/bot.py @@ -348,7 +348,7 @@ async def discussion_handler(): try: while True: fetch_all = db_cursor.execute( - 'SELECT wiki, wikiid, rcid, postid FROM rcgcdw WHERE wikiid IS NOT NULL') + 'SELECT wiki, wikiid, rcid, postid FROM rcgcdw WHERE postid > -1') for db_wiki in fetch_all.fetchall(): header = settings["header"] header["Accept"] = "application/hal+json" @@ -395,7 +395,7 @@ async def discussion_handler(): DBHandler.update_db() continue comment_events = [] - targets = generate_targets(db_wiki["wiki"], "AND NOT wikiid IS NULL") + targets = generate_targets(db_wiki["wiki"], "AND NOT postid = -1") for post in discussion_feed: if post["_embedded"]["thread"][0]["containerType"] == "ARTICLE_COMMENT" and post["id"] > db_wiki["postid"]: comment_events.append(post["forumId"])