mirror of https://github.com/zulip/zulip.git
recipients: Add `savepoint=False` to avoid creating savepoints.
'get_or_create_direct_message_group' is used inside an outer db transaction created in 'edit_scheduled_message'. `transaction.atomic()` block in 'get_or_create_direct_message_group' resulted in savepoint creation. This commit adds `savepoint=False` to avoid that.
This commit is contained in:
parent
0e67e4f1a1
commit
ca4760a04c
|
@ -165,7 +165,7 @@ def get_or_create_direct_message_group(id_list: list[int]) -> DirectMessageGroup
|
||||||
from zerver.models import Subscription, UserProfile
|
from zerver.models import Subscription, UserProfile
|
||||||
|
|
||||||
direct_message_group_hash = get_direct_message_group_hash(id_list)
|
direct_message_group_hash = get_direct_message_group_hash(id_list)
|
||||||
with transaction.atomic():
|
with transaction.atomic(savepoint=False):
|
||||||
(direct_message_group, created) = DirectMessageGroup.objects.get_or_create(
|
(direct_message_group, created) = DirectMessageGroup.objects.get_or_create(
|
||||||
huddle_hash=direct_message_group_hash,
|
huddle_hash=direct_message_group_hash,
|
||||||
group_size=len(id_list),
|
group_size=len(id_list),
|
||||||
|
|
Loading…
Reference in New Issue