mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 23:07:42 -02:30
Don't reverse sync preload script data (#6644)
Signed-off-by: Rick Elrod <rick@elrod.me>
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from crum import impersonate
|
from crum import impersonate
|
||||||
|
from ansible_base.resource_registry.signals.handlers import no_reverse_sync
|
||||||
from awx.main.models import User, Organization, Project, Inventory, CredentialType, Credential, Host, JobTemplate
|
from awx.main.models import User, Organization, Project, Inventory, CredentialType, Credential, Host, JobTemplate
|
||||||
from awx.main.signals import disable_computed_fields
|
from awx.main.signals import disable_computed_fields
|
||||||
|
|
||||||
@@ -16,8 +17,9 @@ class Command(BaseCommand):
|
|||||||
def handle(self, *args, **kwargs):
|
def handle(self, *args, **kwargs):
|
||||||
# Wrap the operation in an atomic block, so we do not on accident
|
# Wrap the operation in an atomic block, so we do not on accident
|
||||||
# create the organization but not create the project, etc.
|
# create the organization but not create the project, etc.
|
||||||
with transaction.atomic():
|
with no_reverse_sync():
|
||||||
self._handle()
|
with transaction.atomic():
|
||||||
|
self._handle()
|
||||||
|
|
||||||
def _handle(self):
|
def _handle(self):
|
||||||
changed = False
|
changed = False
|
||||||
|
|||||||
Reference in New Issue
Block a user