Fix crash on no email provided to edit user

This commit is contained in:
rubenwardy 2018-05-14 01:35:18 +01:00
parent e2341aafd9
commit c26c6ab220
No known key found for this signature in database
GPG Key ID: A1E29D52FF81513C
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ def user_profile_page(username):
if user.checkPerm(current_user, Permission.CHANGE_EMAIL):
newEmail = form["email"].data
if newEmail != user.email:
if newEmail != user.email and newEmail.strip() != "":
token = randomString(32)
ver = UserEmailVerification()