Have all error pages be rendered by Angular
Fixes #2198 Fixes https://www.pivotaltracker.com/story/show/135724483
This commit is contained in:
parent
0aa6e6cd58
commit
c06bba38de
13 changed files with 78 additions and 116 deletions
|
@ -440,7 +440,7 @@ def confirm_user_email(code):
|
|||
code = EmailConfirmation.get(EmailConfirmation.code == code,
|
||||
EmailConfirmation.email_confirm == True)
|
||||
except EmailConfirmation.DoesNotExist:
|
||||
raise DataModelException('Invalid email confirmation code.')
|
||||
raise DataModelException('Invalid email confirmation code')
|
||||
|
||||
user = code.user
|
||||
user.verified = True
|
||||
|
@ -449,7 +449,7 @@ def confirm_user_email(code):
|
|||
new_email = code.new_email
|
||||
if new_email and new_email != old_email:
|
||||
if find_user_by_email(new_email):
|
||||
raise DataModelException('E-mail address already used.')
|
||||
raise DataModelException('E-mail address already used')
|
||||
|
||||
old_email = user.email
|
||||
user.email = new_email
|
||||
|
@ -465,10 +465,10 @@ def create_reset_password_email_code(email):
|
|||
try:
|
||||
user = User.get(User.email == email)
|
||||
except User.DoesNotExist:
|
||||
raise InvalidEmailAddressException('Email address was not found.')
|
||||
raise InvalidEmailAddressException('Email address was not found')
|
||||
|
||||
if user.organization:
|
||||
raise InvalidEmailAddressException('Organizations can not have passwords.')
|
||||
raise InvalidEmailAddressException('Organizations can not have passwords')
|
||||
|
||||
code = EmailConfirmation.create(user=user, pw_reset=True)
|
||||
return code
|
||||
|
|
Reference in a new issue