diff --git a/awx/api/views.py b/awx/api/views.py index af32ffd0a9..96c3bf396e 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -1637,7 +1637,7 @@ class InventoryScriptView(RetrieveAPIView): group_children.append(from_group_name) # Now use in-memory maps to build up group info. - for group in obj.groups: + for group in obj.groups.all(): group_info = OrderedDict() group_info['hosts'] = group_hosts_map.get(group.id, []) group_info['children'] = group_children_map.get(group.id, [])