mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 20:51:21 -03:30
Simplify select_related.
This commit is contained in:
parent
e63716c0bb
commit
9f629048da
@ -1843,12 +1843,11 @@ class UnifiedJobAccess(BaseAccess):
|
||||
qs = qs.select_related(
|
||||
'created_by',
|
||||
'modified_by',
|
||||
'unified_job_node__workflow_job',
|
||||
)
|
||||
qs = qs.prefetch_related(
|
||||
'unified_job_template',
|
||||
)
|
||||
if self.model.spawned_by_workflow:
|
||||
qs = qs.select_related('unified_job_node__workflow_job')
|
||||
|
||||
# WISH - sure would be nice if the following worked, but it does not.
|
||||
# In the future, as django and polymorphic libs are upgraded, try again.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user