mirror of
https://github.com/ansible/awx.git
synced 2026-05-13 20:37:39 -02:30
Execution environments are meaningless for workflows
so, remove them from the API endpoints for workflows. Also, tear out the WFJT.execution_environment step in the resolver. If we want that to be a thing, it ought to be a .default_environment instead.
This commit is contained in:
committed by
Shane McDonald
parent
d1d3711fee
commit
85bb4e976f
@@ -471,13 +471,6 @@ class ExecutionEnvironmentMixin(models.Model):
|
||||
template = getattr(self, 'unified_job_template', None)
|
||||
if template is not None and template.execution_environment is not None:
|
||||
return template.execution_environment
|
||||
wf_node = getattr(self, 'unified_job_node', None)
|
||||
while wf_node is not None:
|
||||
wf_template = wf_node.workflow_job.workflow_job_template
|
||||
# NOTE: sliced workflow_jobs have a null workflow_job_template
|
||||
if wf_template and wf_template.execution_environment is not None:
|
||||
return wf_template.execution_environment
|
||||
wf_node = getattr(wf_node.workflow_job, 'unified_job_node', None)
|
||||
if getattr(self, 'project_id', None) and self.project.default_environment is not None:
|
||||
return self.project.default_environment
|
||||
if getattr(self, 'organization_id', None) and self.organization.default_environment is not None:
|
||||
|
||||
Reference in New Issue
Block a user