mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 19:41:11 +00:00
Fixes searching for users in get started view
This commit is contained in:
parent
f9d7512ffd
commit
c918edb622
1 changed files with 5 additions and 2 deletions
|
@ -113,13 +113,16 @@ class GetStartedUsers(View):
|
|||
.filter(
|
||||
similarity__gt=0.5,
|
||||
)
|
||||
.exclude(
|
||||
id=request.user.id,
|
||||
)
|
||||
.order_by("-similarity")[:5]
|
||||
)
|
||||
data = {"no_results": not user_results}
|
||||
|
||||
if user_results.count() < 5:
|
||||
user_results = list(user_results) + suggested_users.get_suggestions(
|
||||
request.user
|
||||
user_results = list(user_results) + list(
|
||||
suggested_users.get_suggestions(request.user)
|
||||
)
|
||||
|
||||
data["suggested_users"] = user_results
|
||||
|
|
Loading…
Reference in a new issue