mirror of https://github.com/zulip/zulip.git
users: Add `savepoint=False` to avoid creating savepoints.
'do_deactivate_user' is used inside an outer db transaction created in 'sync_user_from_ldap'. `transaction.atomic()` block in 'do_deactivate_user' resulted in savepoint creation. This commit adds `savepoint=False` to avoid that.
This commit is contained in:
parent
27eeb08459
commit
86a909e703
|
@ -486,7 +486,7 @@ def do_deactivate_user(
|
||||||
for profile in bot_profiles:
|
for profile in bot_profiles:
|
||||||
do_deactivate_user(profile, _cascade=False, acting_user=acting_user)
|
do_deactivate_user(profile, _cascade=False, acting_user=acting_user)
|
||||||
|
|
||||||
with transaction.atomic():
|
with transaction.atomic(savepoint=False):
|
||||||
if user_profile.realm.is_zephyr_mirror_realm: # nocoverage
|
if user_profile.realm.is_zephyr_mirror_realm: # nocoverage
|
||||||
# For zephyr mirror users, we need to make them a mirror dummy
|
# For zephyr mirror users, we need to make them a mirror dummy
|
||||||
# again; otherwise, other users won't get the correct behavior
|
# again; otherwise, other users won't get the correct behavior
|
||||||
|
|
Loading…
Reference in New Issue