From 8c8cc8018319f2d043339f01309aae7e79eab83e Mon Sep 17 00:00:00 2001 From: Prakhar Pratyush Date: Mon, 4 Nov 2024 13:02:13 +0530 Subject: [PATCH] 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. --- zerver/actions/create_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/actions/create_user.py b/zerver/actions/create_user.py index b0b6cef415..297622dccf 100644 --- a/zerver/actions/create_user.py +++ b/zerver/actions/create_user.py @@ -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()