mirror of
https://github.com/ansible/awx.git
synced 2026-10-31 14:36:17 -02:30
test: remove unrelated inventory and job template changes
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
# Copyright (c) 2017 Ansible, Inc.
|
# Copyright (c) 2017 Ansible, Inc.
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
# Job template URL routing configuration
|
|
||||||
|
|
||||||
from django.urls import include, re_path
|
from django.urls import include, re_path
|
||||||
|
|
||||||
|
|||||||
@@ -481,11 +481,6 @@ class Inventory(CommonModelNameNotUnique, RelatedJobsMixin, OpaQueryPathMixin):
|
|||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
self._update_host_smart_inventory_memeberships()
|
self._update_host_smart_inventory_memeberships()
|
||||||
super(Inventory, self).save(*args, **kwargs)
|
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':
|
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
|
# Minimal update of host_count for smart inventory host filter changes
|
||||||
self.update_computed_fields()
|
self.update_computed_fields()
|
||||||
|
|||||||
Reference in New Issue
Block a user