From 1d807fefe0fbb46a6936884524ed470462576b8a Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 10 Feb 2019 00:04:00 +0000 Subject: [PATCH] Old copypaste fail - we were returning the most recent user id when creating channels (Database.py) --- src/Database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Database.py b/src/Database.py index dd063226..1ba9bac3 100644 --- a/src/Database.py +++ b/src/Database.py @@ -39,7 +39,7 @@ class Channels(Table): (server_id, name) VALUES (?, ?)""", [server_id, name.lower()]) return self.database.execute_fetchone( - "SELECT user_id FROM users ORDER BY user_id DESC LIMIT 1")[0] + "SELECT channel_id FROM channels ORDER BY channel_id DESC LIMIT 1")[0] def delete(self, channel_id: int): self.database.execute("DELETE FROM channels WHERE channel_id=?", [channel_id])