mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 15:06:02 -03:30
Updating AC-984... delay field computation until after the group has been removed
This commit is contained in:
@@ -357,12 +357,17 @@ class Group(CommonModelNameNotUnique):
|
|||||||
When marking groups inactive, remove all associations to related
|
When marking groups inactive, remove all associations to related
|
||||||
groups/hosts/inventory_sources.
|
groups/hosts/inventory_sources.
|
||||||
'''
|
'''
|
||||||
super(Group, self).mark_inactive(save=save)
|
from awx.main.signals import ignore_inventory_computed_fields
|
||||||
self.inventory_source.mark_inactive(save=save)
|
i = self.inventory
|
||||||
self.inventory_sources.clear()
|
|
||||||
self.parents.clear()
|
with ignore_inventory_computed_fields():
|
||||||
self.children.clear()
|
super(Group, self).mark_inactive(save=save)
|
||||||
self.hosts.clear()
|
self.inventory_source.mark_inactive(save=save)
|
||||||
|
self.inventory_sources.clear()
|
||||||
|
self.parents.clear()
|
||||||
|
self.children.clear()
|
||||||
|
self.hosts.clear()
|
||||||
|
i.update_computed_fields()
|
||||||
|
|
||||||
def update_computed_fields(self):
|
def update_computed_fields(self):
|
||||||
'''
|
'''
|
||||||
|
|||||||
Reference in New Issue
Block a user