From dc2fbde8ab466c7e347fdb5e667986d5191d06fd Mon Sep 17 00:00:00 2001 From: David Hoppenbrouwers Date: Fri, 7 Oct 2022 22:52:29 +0200 Subject: [PATCH] Fix db.commit() accidentaly removed from add_comment_to_comment --- db/sqlite.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db/sqlite.py b/db/sqlite.py index 1d74bc5..429197b 100644 --- a/db/sqlite.py +++ b/db/sqlite.py @@ -161,7 +161,6 @@ class DB: def add_comment_to_comment(self, parent_id, author_id, text, time): db = self._db() c = db.cursor() - print(c.lastrowid, parent_id) c.execute(''' insert into comments(thread_id, parent_id, author_id, text, create_time, modify_time) select thread_id, ?, ?, ?, ?, ? @@ -170,7 +169,7 @@ class DB: ''', (parent_id, author_id, text, time, time, parent_id) ) - print(c.lastrowid) + db.commit() return c.rowcount > 0 def _db(self):