From cdb1b42f72f0875dcff324839a8552c9d1879976 Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 23 Jan 2023 04:14:56 +0200 Subject: [PATCH] fix this https://stupidpol.site/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/3342634#context --- files/routes/comments.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 64e20b3bd..1c9fde700 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -43,11 +43,12 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None): g.db.commit() if comment.parent_submission: - post = comment.post + post = comment.parent_submission else: - post = get_post(NOTIFICATION_THREAD, v=v) - + post = NOTIFICATION_THREAD + post = get_post(post, v=v) + if post.over_18 and not (v and v.over_18) and not session.get('over_18', 0) >= int(time.time()): if v and v.client: abort(403, "This content is not suitable for some users and situations.") else: return render_template("errors/nsfw.html", v=v), 403