From 9cdcfa54d604b45bd802fbf04c1e303d2ebf452f Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Mon, 10 Apr 2023 20:40:41 -0500 Subject: [PATCH] Filter hidden comments --- judge/comments.py | 1 + 1 file changed, 1 insertion(+) diff --git a/judge/comments.py b/judge/comments.py index d99f11e..08d1cb7 100644 --- a/judge/comments.py +++ b/judge/comments.py @@ -166,6 +166,7 @@ class CommentedDetailView(TemplateResponseMixin, SingleObjectMixin, View): context["comment_lock"] = self.is_comment_locked() queryset = ( queryset.select_related("author__user") + .filter(hidden=False) .defer("author__about") .annotate(revisions=Count("versions")) )