Fix queryset filter in GroupDetailView to correctly reference group members
This commit is contained in:
parent
16cd905694
commit
539abe11a1
1 changed files with 3 additions and 1 deletions
|
@ -73,7 +73,9 @@ class GroupDetailView(MemberFilterMixin, GroupMixin, DetailView):
|
|||
data["members"] = data["group"].members.annotate(
|
||||
count=Count(
|
||||
"musicvideo",
|
||||
filter=Q(group=data["group"], musicvideo__blacklisted=False),
|
||||
filter=Q(
|
||||
musicvideo__group=data["group"], musicvideo__blacklisted=False
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue