diff --git a/files/routes/comments.py b/files/routes/comments.py index 75deca849..a1013a62c 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -644,6 +644,7 @@ def api_comment(v): parent_post.comment_count += 1 g.db.add(parent_post) + g.db.flush() if request.headers.get("Authorization"): return c.json return {"comment": render_template("comments.html", v=v, comments=[c], ajax=True)}