mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-05 14:58:43 +00:00
Fixes followers/following logic on suggested users
This commit is contained in:
parent
4fb85ced5f
commit
5d9cfe0276
1 changed files with 2 additions and 2 deletions
|
@ -89,11 +89,11 @@ def get_annotated_users(viewer, *args, **kwargs):
|
||||||
.exclude(Q(id__in=viewer.blocks.all()) | Q(blocks=viewer))
|
.exclude(Q(id__in=viewer.blocks.all()) | Q(blocks=viewer))
|
||||||
.annotate(
|
.annotate(
|
||||||
mutuals=Count(
|
mutuals=Count(
|
||||||
"following",
|
"followers",
|
||||||
filter=Q(
|
filter=Q(
|
||||||
~Q(id=viewer.id),
|
~Q(id=viewer.id),
|
||||||
~Q(id__in=viewer.following.all()),
|
~Q(id__in=viewer.following.all()),
|
||||||
following__in=viewer.following.all(),
|
followers__in=viewer.following.all(),
|
||||||
),
|
),
|
||||||
distinct=True,
|
distinct=True,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue