mirror of https://github.com/zulip/zulip.git
actions.py: Remove transaction.atomic from do_start_email_change_process.
Don't think it's necessary?
This commit is contained in:
parent
ea6a04781b
commit
215568aae2
|
@ -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
|
||||
|
|
|
@ -268,7 +268,7 @@ class LoginTest(ZulipTestCase):
|
|||
with queries_captured() as queries:
|
||||
self.register(self.nonreg_email('test'), "test")
|
||||
# Ensure the number of queries we make is not O(streams)
|
||||
self.assert_length(queries, 47)
|
||||
self.assert_length(queries, 46)
|
||||
user_profile = self.nonreg_user('test')
|
||||
self.assertEqual(get_session_dict_user(self.client.session), user_profile.id)
|
||||
self.assertFalse(user_profile.enable_stream_desktop_notifications)
|
||||
|
|
Loading…
Reference in New Issue