actions.py: Remove transaction.atomic from do_start_email_change_process.

Don't think it's necessary?
This commit is contained in:
Rishi Gupta
2017-06-10 13:49:07 -07:00
committed by Tim Abbott
parent ea6a04781b
commit 215568aae2
2 changed files with 10 additions and 11 deletions

View File

@@ -636,17 +636,16 @@ def do_start_email_change_process(user_profile, new_email):
'new_email': new_email,
}
with transaction.atomic():
obj = EmailChangeStatus.objects.create(new_email=new_email,
old_email=old_email,
user_profile=user_profile,
realm=user_profile.realm)
obj = EmailChangeStatus.objects.create(new_email=new_email,
old_email=old_email,
user_profile=user_profile,
realm=user_profile.realm)
EmailChangeConfirmation.objects.send_confirmation(
obj, 'zerver/emails/confirm_new_email', new_email,
additional_context=context,
host=user_profile.realm.host,
)
EmailChangeConfirmation.objects.send_confirmation(
obj, 'zerver/emails/confirm_new_email', new_email,
additional_context=context,
host=user_profile.realm.host,
)
def compute_irc_user_fullname(email):
# type: (NonBinaryStr) -> NonBinaryStr