forked from mirrors/bookwyrm
Merge pull request #1105 from bookwyrm-social/suggested-users-error
Fixes logic error in get started user view
This commit is contained in:
commit
4af6667d6a
2 changed files with 3 additions and 3 deletions
|
@ -120,9 +120,9 @@ class GetStartedUsers(View):
|
|||
)
|
||||
|
||||
if user_results.count() < 5:
|
||||
suggested_users = get_suggested_users(request.user)
|
||||
user_results = list(user_results) + list(get_suggested_users(request.user))
|
||||
|
||||
data = {
|
||||
"suggested_users": list(user_results) + list(suggested_users),
|
||||
"suggested_users": user_results,
|
||||
}
|
||||
return TemplateResponse(request, "get_started/users.html", data)
|
||||
|
|
|
@ -27,7 +27,7 @@ class PasswordResetRequest(View):
|
|||
"""create a password reset token"""
|
||||
email = request.POST.get("email")
|
||||
try:
|
||||
user = models.User.objects.get(email=email)
|
||||
user = models.User.objects.get(email=email, email__isnull=False)
|
||||
except models.User.DoesNotExist:
|
||||
data = {"error": _("No user with that email address was found.")}
|
||||
return TemplateResponse(request, "password_reset_request.html", data)
|
||||
|
|
Loading…
Reference in a new issue