mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 12:33:40 +00:00
Django 1.8 compatibility: transactions
- autocommit is now the default - commit_on_success is now atomic (imported from commit b6166ca666ff23d34f2871ca365ce3ec66b0fa86)
This commit is contained in:
@@ -1109,7 +1109,7 @@ def get_huddle(id_list):
|
||||
def get_huddle_backend(huddle_hash, id_list):
|
||||
(huddle, created) = Huddle.objects.get_or_create(huddle_hash=huddle_hash)
|
||||
if created:
|
||||
with transaction.commit_on_success():
|
||||
with transaction.atomic():
|
||||
recipient = Recipient.objects.create(type_id=huddle.id,
|
||||
type=Recipient.HUDDLE)
|
||||
subs_to_create = [Subscription(recipient=recipient,
|
||||
|
||||
Reference in New Issue
Block a user