From efcbea1fc5c3d655247e0d16cfe2e1139978f4e7 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Thu, 3 Jun 2021 16:20:47 -0400 Subject: [PATCH] Skip sliced jobs from the workflow EE logic --- awx/main/models/mixins.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/main/models/mixins.py b/awx/main/models/mixins.py index 760cce4e47..f73ae472e8 100644 --- a/awx/main/models/mixins.py +++ b/awx/main/models/mixins.py @@ -474,7 +474,8 @@ class ExecutionEnvironmentMixin(models.Model): wf_node = getattr(self, 'unified_job_node', None) while wf_node is not None: wf_template = wf_node.workflow_job.workflow_job_template - if wf_template.execution_environment is not None: + # 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', None) and self.project.default_environment is not None: