1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

Merge pull request #1162 from ryanpetrello/release_3.2.4

properly filter disabled hosts on smart inventory composition
This commit is contained in:
Ryan Petrello 2018-03-29 08:51:20 -04:00 committed by GitHub
commit 61d58b83a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2408,7 +2408,7 @@ class InventoryScriptView(RetrieveAPIView):
return Response({})
else:
all_group = data.setdefault('all', dict())
smart_hosts_qs = obj.hosts.all()
smart_hosts_qs = obj.hosts.filter(**hosts_q).all()
smart_hosts = list(smart_hosts_qs.values_list('name', flat=True))
all_group['hosts'] = smart_hosts
else: