mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
streams: Add savepoint=False
to avoid creating savepoints.
'bulk_remove_subscriptions' is used inside an outer db transaction created in 'do_change_bot_owner'. `transaction.atomic()` block in 'bulk_remove_subscriptions' resulted in savepoint creation. This commit adds `savepoint=False` to avoid that.
This commit is contained in:
committed by
Tim Abbott
parent
8c8cc80183
commit
27eeb08459
@@ -979,7 +979,7 @@ def bulk_remove_subscriptions(
|
||||
streams_to_unsubscribe = [sub_info.stream for sub_info in subs_to_deactivate]
|
||||
# We do all the database changes in a transaction to ensure
|
||||
# RealmAuditLog entries are atomically created when making changes.
|
||||
with transaction.atomic():
|
||||
with transaction.atomic(savepoint=False):
|
||||
Subscription.objects.filter(
|
||||
id__in=sub_ids_to_deactivate,
|
||||
).update(active=False)
|
||||
|
Reference in New Issue
Block a user