From c12f7a5f9a2b36a8fab047b1cb78cf95c8e50070 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 22 Sep 2022 22:20:29 +0200 Subject: [PATCH] commit before rendering --- files/routes/comments.py | 2 +- files/routes/posts.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index fa6cf2a99..e73b9ecab 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -700,7 +700,7 @@ def edit_comment(cid, v): n = Notification(comment_id=c.id, user_id=x) g.db.add(n) - + g.db.commit() return {"comment": c.realbody(v)} diff --git a/files/routes/posts.py b/files/routes/posts.py index d0bf7da53..a770ea38e 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1058,6 +1058,7 @@ def submit_post(v, sub=None): if not post.private and SITE == 'watchpeopledie.co': send_wpd_message(post.permalink) + g.db.commit() if request.headers.get("Authorization"): return post.json else: post.voted = 1