mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 03:51:08 +00:00
Fixes follower/following logic in suggested user annotations
This commit is contained in:
parent
7449f34a61
commit
8b154b69fb
1 changed files with 2 additions and 2 deletions
|
@ -190,11 +190,11 @@ def get_annotated_users(user, *args, **kwargs):
|
|||
.exclude(Q(id__in=user.blocks.all()) | Q(blocks=user))
|
||||
.annotate(
|
||||
mutuals=Count(
|
||||
"following",
|
||||
"followers",
|
||||
filter=Q(
|
||||
~Q(id=user.id),
|
||||
~Q(id__in=user.following.all()),
|
||||
following__in=user.following.all(),
|
||||
followers__in=user.following.all(),
|
||||
),
|
||||
distinct=True,
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue