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

include all roles in the select_related

This commit is contained in:
AlanCoding 2016-07-11 16:51:29 -04:00
parent bd82a7e930
commit 1b613d919b

View File

@ -958,6 +958,7 @@ class ProjectList(ListCreateAPIView):
'admin_role',
'use_role',
'update_role',
'read_role',
)
return projects_qs
@ -1487,7 +1488,7 @@ class InventoryList(ListCreateAPIView):
def get_queryset(self):
qs = Inventory.accessible_objects(self.request.user, 'read_role')
qs = qs.select_related('admin_role', 'read_role', 'update_role', 'use_role')
qs = qs.select_related('admin_role', 'read_role', 'update_role', 'use_role', 'adhoc_role')
return qs
class InventoryDetail(RetrieveUpdateDestroyAPIView):