From aced39943b4b3390682150c6ae4d327f02bed1a2 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 9 Apr 2024 03:38:18 +0200 Subject: [PATCH] fix 500 error --- files/routes/comments.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 5ce46b84e..fd5f4cb94 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -773,8 +773,10 @@ def admin_distinguish_comment(c_id, v): g.db.add(comment) - if v.mods_hole(comment.post.hole): cls = HoleAction - else: cls = ModAction + if comment.parent_post and v.mods_hole(comment.post.hole): + cls = HoleAction + else: + cls = ModAction ma = cls( kind=kind,