From b42341a0e8b042805da037bee2a747e4a288757e Mon Sep 17 00:00:00 2001 From: Markus-Rost Date: Sun, 22 Nov 2020 14:19:21 +0100 Subject: [PATCH] fully remove wikiid --- .gitignore | 1 + src/bot.py | 4 ++-- src/wiki.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d5c834b..07a55a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ __pycache__/ settings.json +logs/ *.log *.db *.code-workspace diff --git a/src/bot.py b/src/bot.py index 36864f8..2207f8b 100644 --- a/src/bot.py +++ b/src/bot.py @@ -369,8 +369,8 @@ async def discussion_handler(): error = discussion_feed_resp["error"] if error == "site doesn't exists": if db_wiki["rcid"] != -1: - db_cursor.execute("UPDATE rcgcdw SET wikiid = ? WHERE wiki = ?", - (None, db_wiki["wiki"],)) + db_cursor.execute("UPDATE rcgcdw SET postid = ? WHERE wiki = ?", + ("-1", db_wiki["wiki"],)) else: await local_wiki.remove(db_wiki["wiki"], 1000) DBHandler.update_db() diff --git a/src/wiki.py b/src/wiki.py index 50557c6..a8758f5 100644 --- a/src/wiki.py +++ b/src/wiki.py @@ -203,7 +203,7 @@ async def process_mwmsgs(wiki_response: dict, local_wiki: Wiki, mw_msgs: dict): mw_msgs[key] = msgs # it may be a little bit messy for sure, however I don't expect any reason to remove mw_msgs entries by one local_wiki.mw_messages = key -# db_wiki: webhook, wiki, lang, display, wikiid, rcid, postid +# db_wiki: webhook, wiki, lang, display, rcid, postid async def essential_info(change: dict, changed_categories, local_wiki: Wiki, target: tuple, paths: tuple, request: dict, rate_limiter: RateLimiter): """Prepares essential information for both embed and compact message format."""