mirror of https://github.com/zulip/zulip.git
do_create_user: Use transaction.atomic.
Have kept process_new_human_user out of the atomic block because it involves many different operations and also sends events. Tried enclosing event in on_commit but that would need many changes in the tests, so have skipped it for now.
This commit is contained in:
parent
9321095406
commit
168f241ff0
|
@ -655,7 +655,7 @@ def do_create_user(
|
||||||
acting_user: Optional[UserProfile],
|
acting_user: Optional[UserProfile],
|
||||||
enable_marketing_emails: bool = True,
|
enable_marketing_emails: bool = True,
|
||||||
) -> UserProfile:
|
) -> UserProfile:
|
||||||
|
with transaction.atomic():
|
||||||
user_profile = create_user(
|
user_profile = create_user(
|
||||||
email=email,
|
email=email,
|
||||||
password=password,
|
password=password,
|
||||||
|
|
Loading…
Reference in New Issue