mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
adjusted prefetches from time test results
This commit is contained in:
parent
5362ee049b
commit
d430a03721
@ -1681,6 +1681,7 @@ class HostList(ListCreateAPIView):
|
||||
always_allow_superuser = False
|
||||
model = Host
|
||||
serializer_class = HostSerializer
|
||||
capabilities_prefetch = ['inventory.admin']
|
||||
|
||||
|
||||
class HostDetail(RetrieveUpdateDestroyAPIView):
|
||||
|
||||
@ -1549,7 +1549,7 @@ class WorkflowJobTemplateAccess(BaseAccess):
|
||||
missing_credentials = []
|
||||
missing_inventories = []
|
||||
qs = obj.workflow_job_template_nodes
|
||||
qs.select_related('unified_job_template', 'inventory', 'credential')
|
||||
qs = qs.prefetch_related('unified_job_template', 'inventory__use_role', 'credential__use_role')
|
||||
for node in qs.all():
|
||||
node_errors = {}
|
||||
if node.inventory and self.user not in node.inventory.use_role:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user