disable computed for create preload data mgmt cmd

This commit is contained in:
Wayne Witzel III
2018-08-09 10:11:37 -04:00
parent 41f88fd2f6
commit 89642a449f

View File

@@ -4,6 +4,7 @@
from django.core.management.base import BaseCommand
from crum import impersonate
from awx.main.models import User, Organization, Project, Inventory, CredentialType, Credential, Host, JobTemplate
from awx.main.signals import disable_computed_fields
class Command(BaseCommand):
@@ -22,6 +23,7 @@ class Command(BaseCommand):
except IndexError:
superuser = None
with impersonate(superuser):
with disable_computed_fields():
o = Organization.objects.create(name='Default')
p = Project(name='Demo Project',
scm_type='git',