diff --git a/awx/api/urls/job_template.py b/awx/api/urls/job_template.py index 81ec981dec..e7d7f3cbde 100644 --- a/awx/api/urls/job_template.py +++ b/awx/api/urls/job_template.py @@ -1,6 +1,5 @@ # Copyright (c) 2017 Ansible, Inc. # All Rights Reserved. -# Job template URL routing configuration from django.urls import include, re_path diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py index ca34aab684..4157d96921 100644 --- a/awx/main/models/inventory.py +++ b/awx/main/models/inventory.py @@ -481,11 +481,6 @@ class Inventory(CommonModelNameNotUnique, RelatedJobsMixin, OpaQueryPathMixin): def save(self, *args, **kwargs): self._update_host_smart_inventory_memeberships() super(Inventory, self).save(*args, **kwargs) - update_fields = kwargs.get('update_fields') - if update_fields is None or {'organization', 'organization_id'} & set(update_fields): - # An inventory source takes its organization from its inventory and can't set its own, so keep it in step - # when the inventory moves. - self.inventory_sources.exclude(organization_id=self.organization_id).update(organization_id=self.organization_id) if self.kind == 'smart' and 'host_filter' in kwargs.get('update_fields', ['host_filter']) and connection.vendor != 'sqlite': # Minimal update of host_count for smart inventory host filter changes self.update_computed_fields()