From bcab0ef9c3924d6d818d61ff8f56c9b71a098816 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 9 Sep 2023 00:04:39 +0300 Subject: [PATCH] always commit or rollback --- files/routes/comments.py | 2 +- files/routes/posts.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 83ef9de16..84b8ce777 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -32,8 +32,8 @@ def _mark_comment_as_read(cid, vid): if notif and not notif.read: notif.read = True db.add(notif) - db.commit() + db.commit() db.close() stdout.flush() diff --git a/files/routes/posts.py b/files/routes/posts.py index b43b26f8a..2b82382d5 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -356,8 +356,8 @@ def thumbnail_thread(fetch_url, pid): if thumburl: p.thumburl = thumburl db.add(p) - db.commit() + db.commit() db.close() stdout.flush()