Removed unused form.

And used session.pop to remove NEW_EMAIL from the session.
Also removed variable not being used in user_profile.
This commit is contained in:
Rebecca Law
2016-10-14 14:46:31 +01:00
parent a0e7d569e9
commit 789ba58c2e
2 changed files with 1 additions and 17 deletions

View File

@@ -25,7 +25,6 @@ from app import user_api_client
NEW_EMAIL = 'new-email'
NEW_MOBILE = 'new-mob'
NEW_EMAIL_PASSWORD_CONFIRMED = 'new-email-password-confirmed'
NEW_MOBILE_PASSWORD_CONFIRMED = 'new-mob-password-confirmed'
@@ -110,8 +109,7 @@ def user_profile_email_confirm(token):
user = user_api_client.get_user(user_id)
user.email_address = new_email
user_api_client.update_user(user)
if session.get(NEW_EMAIL, None):
del session[NEW_EMAIL]
session.pop(NEW_EMAIL, None)
return redirect(url_for('.user_profile'))