Filter hidden comments

This commit is contained in:
cuom1999 2023-04-10 20:40:41 -05:00
parent 7ef0c47427
commit 9cdcfa54d6

View file

@ -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"))
)