mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
Merge pull request #152 from wwitzel3/issue-7355
Ensure hosts list properly when given read access to a smart inventory
This commit is contained in:
@@ -1959,6 +1959,10 @@ class InventoryHostsList(SubListCreateAttachDetachAPIView):
|
||||
parent_key = 'inventory'
|
||||
capabilities_prefetch = ['inventory.admin']
|
||||
|
||||
def get_queryset(self):
|
||||
inventory = self.get_parent_object()
|
||||
return getattrd(inventory, self.relationship).all()
|
||||
|
||||
|
||||
class HostGroupsList(ControlledByScmMixin, SubListCreateAttachDetachAPIView):
|
||||
''' the list of groups a host is directly a member of '''
|
||||
|
||||
Reference in New Issue
Block a user