mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-25 09:30:33 +00:00
Sort suggestions by mutuals
This commit is contained in:
parent
00a14e89a0
commit
deaa06d44c
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ class SuggestedUsers(RedisStore):
|
|||
).annotate(mutuals=Case(*annotations, output_field=IntegerField(), default=0))
|
||||
if local:
|
||||
users = users.filter(local=True)
|
||||
return users[:5]
|
||||
return users.order_by("-mutuals")[:5]
|
||||
|
||||
|
||||
def get_annotated_users(viewer, *args, **kwargs):
|
||||
|
|
Loading…
Reference in a new issue