fully remove wikiid

This commit is contained in:
Markus-Rost 2020-11-22 14:19:21 +01:00
parent 884662b568
commit b42341a0e8
3 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View file

@ -1,5 +1,6 @@
__pycache__/
settings.json
logs/
*.log
*.db
*.code-workspace

View file

@ -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()

View file

@ -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."""