create_user: Add `savepoint=False` to avoid creating savepoints.

'do_activate_mirror_dummy_user' is used inside an outer db
transaction created in 'registration_helper'.

`transaction.atomic()` block in 'do_activate_mirror_dummy_user'
resulted in savepoint creation.

This commit adds `savepoint=False` to avoid that.
This commit is contained in:
Prakhar Pratyush 2024-11-04 13:02:13 +05:30 committed by Tim Abbott
parent ca4760a04c
commit 8c8cc80183
1 changed files with 1 additions and 1 deletions

View File

@ -659,7 +659,7 @@ def do_activate_mirror_dummy_user(
if settings.BILLING_ENABLED:
from corporate.lib.stripe import RealmBillingSession
with transaction.atomic():
with transaction.atomic(savepoint=False):
change_user_is_active(user_profile, True)
user_profile.is_mirror_dummy = False
user_profile.set_unusable_password()