Fixes logic error in get started user view

This commit is contained in:
Mouse Reeve 2021-05-20 15:17:05 -07:00
parent 69a1f6a618
commit 82f74a4049
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)