Skip to content
Snippets Groups Projects
Commit 1958883a authored by Dan Braghis's avatar Dan Braghis
Browse files

Wrap migrate command in transaction

parent 42d35abc
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ import json
from django.contrib.auth import get_user_model
from django.core.management.base import BaseCommand
from django.db import transaction
class Command(BaseCommand):
......@@ -17,6 +18,7 @@ class Command(BaseCommand):
help='Perform a run dry-run',
)
@transaction.atomic
def handle(self, *args, **options):
with options['source'] as json_data:
User = get_user_model()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment