Merge pull request #1105 from bookwyrm-social/suggested-users-error

Fixes logic error in get started user view
This commit is contained in:
Mouse Reeve 2021-05-20 15:26:39 -07:00 committed by GitHub
commit 4af6667d6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -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)

View file

@ -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)