From abd5f680f54729a95343b9fc801bf49fd462be02 Mon Sep 17 00:00:00 2001 From: Markus-Rost Date: Mon, 27 Jul 2020 00:50:27 +0200 Subject: [PATCH] fix wiki delete --- src/wiki.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wiki.py b/src/wiki.py index 6e297af..cf077bf 100644 --- a/src/wiki.py +++ b/src/wiki.py @@ -76,11 +76,11 @@ class Wiki: logger.warning("Wiki {} responded with HTTP code {}, skipping...".format(wiki_url, status, self.fail_times)) raise WikiServerError - async def remove(self, wiki_id, reason): - await src.discord.wiki_removal(wiki_id, reason) - await src.discord.wiki_removal_monitor(wiki_id, reason) - db_cursor.execute('DELETE FROM rcgcdw WHERE wiki = "?"', (wiki_id,)) - logger.warning('{} rows affected by DELETE FROM rcgcdw WHERE wiki = "{}"'.format(db_cursor.rowcount, wiki_id)) + async def remove(self, wiki_url, reason): + await src.discord.wiki_removal(wiki_url, reason) + await src.discord.wiki_removal_monitor(wiki_url, reason) + db_cursor.execute('DELETE FROM rcgcdw WHERE wiki = ?', (wiki_url,)) + logger.warning('{} rows affected by DELETE FROM rcgcdw WHERE wiki = "{}"'.format(db_cursor.rowcount, wiki_url)) db_connection.commit() async def pull_comment(self, comment_id, WIKI_API_PATH):