Add comment revision count field
This commit is contained in:
parent
b02a30819f
commit
ff6988f29c
5 changed files with 41 additions and 17 deletions
|
@ -169,7 +169,6 @@ class CommentedDetailView(TemplateResponseMixin, SingleObjectMixin, View):
|
|||
queryset.select_related("author__user")
|
||||
.filter(hidden=False)
|
||||
.defer("author__about")
|
||||
.annotate(revisions=Count("versions", distinct=True))
|
||||
)
|
||||
else:
|
||||
queryset = self.object.comments
|
||||
|
@ -180,7 +179,6 @@ class CommentedDetailView(TemplateResponseMixin, SingleObjectMixin, View):
|
|||
.filter(hidden=False)
|
||||
.annotate(
|
||||
count_replies=Count("replies", distinct=True),
|
||||
revisions=Count("versions", distinct=True),
|
||||
)[:DEFAULT_OFFSET]
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue