Filter hidden comments
This commit is contained in:
parent
7ef0c47427
commit
9cdcfa54d6
1 changed files with 1 additions and 0 deletions
|
@ -166,6 +166,7 @@ class CommentedDetailView(TemplateResponseMixin, SingleObjectMixin, View):
|
||||||
context["comment_lock"] = self.is_comment_locked()
|
context["comment_lock"] = self.is_comment_locked()
|
||||||
queryset = (
|
queryset = (
|
||||||
queryset.select_related("author__user")
|
queryset.select_related("author__user")
|
||||||
|
.filter(hidden=False)
|
||||||
.defer("author__about")
|
.defer("author__about")
|
||||||
.annotate(revisions=Count("versions"))
|
.annotate(revisions=Count("versions"))
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue