mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
include all roles in the select_related
This commit is contained in:
@@ -958,6 +958,7 @@ class ProjectList(ListCreateAPIView):
|
|||||||
'admin_role',
|
'admin_role',
|
||||||
'use_role',
|
'use_role',
|
||||||
'update_role',
|
'update_role',
|
||||||
|
'read_role',
|
||||||
)
|
)
|
||||||
return projects_qs
|
return projects_qs
|
||||||
|
|
||||||
@@ -1487,7 +1488,7 @@ class InventoryList(ListCreateAPIView):
|
|||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = Inventory.accessible_objects(self.request.user, 'read_role')
|
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
|
return qs
|
||||||
|
|
||||||
class InventoryDetail(RetrieveUpdateDestroyAPIView):
|
class InventoryDetail(RetrieveUpdateDestroyAPIView):
|
||||||
|
|||||||
Reference in New Issue
Block a user