mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-27 18:40:31 +00:00
Merge pull request #1775 from bookwyrm-social/order-suggestions
Sort suggestions by mutuals
This commit is contained in:
commit
602574566b
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