diff --git a/awx/ui/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.js b/awx/ui/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.js index 8d6e7badc4..d6990920fa 100644 --- a/awx/ui/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.js +++ b/awx/ui/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.js @@ -24,6 +24,7 @@ function WorkflowJobTemplateAdd() { limit, job_tags, skip_tags, + scm_branch, ...templatePayload } = values; templatePayload.inventory = inventory?.id; @@ -32,6 +33,7 @@ function WorkflowJobTemplateAdd() { templatePayload.limit = limit === '' ? null : limit; templatePayload.job_tags = job_tags === '' ? null : job_tags; templatePayload.skip_tags = skip_tags === '' ? null : skip_tags; + templatePayload.scm_branch = scm_branch === '' ? null : scm_branch; const organizationId = organization?.id || inventory?.summary_fields?.organization.id; try { diff --git a/awx/ui/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.test.js b/awx/ui/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.test.js index 8eaab645fc..1640b9cf4e 100644 --- a/awx/ui/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.test.js +++ b/awx/ui/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.test.js @@ -119,7 +119,7 @@ describe('', () => { job_tags: null, limit: null, organization: undefined, - scm_branch: '', + scm_branch: null, skip_tags: null, webhook_credential: undefined, webhook_service: '', diff --git a/awx/ui/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.js b/awx/ui/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.js index d4929ec663..417451212a 100644 --- a/awx/ui/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.js +++ b/awx/ui/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.js @@ -30,6 +30,7 @@ function WorkflowJobTemplateEdit({ template }) { limit, job_tags, skip_tags, + scm_branch, ...templatePayload } = values; templatePayload.inventory = inventory?.id || null; @@ -38,6 +39,7 @@ function WorkflowJobTemplateEdit({ template }) { templatePayload.limit = limit === '' ? null : limit; templatePayload.job_tags = job_tags === '' ? null : job_tags; templatePayload.skip_tags = skip_tags === '' ? null : skip_tags; + templatePayload.scm_branch = scm_branch === '' ? null : scm_branch; const formOrgId = organization?.id || inventory?.summary_fields?.organization.id || null;