mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 11:11:07 -03:30
fix bug where grandparent groups were excluded
This commit is contained in:
@@ -294,7 +294,7 @@ class Inventory(CommonModelNameNotUnique, ResourceMixin, RelatedJobsMixin):
|
||||
|
||||
# Remove any empty groups
|
||||
for group_name in list(data.keys()):
|
||||
if not data.get(group_name, {}).get('hosts', []):
|
||||
if not (data.get(group_name, {}).get('hosts', []) or data.get(group_name, {}).get('children', [])):
|
||||
data.pop(group_name)
|
||||
|
||||
if hostvars:
|
||||
|
||||
Reference in New Issue
Block a user