diff --git a/awx/ui/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.js b/awx/ui/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.js index c8a11308dd..7d96fda714 100644 --- a/awx/ui/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.js +++ b/awx/ui/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.js @@ -23,11 +23,13 @@ function WorkflowJobTemplateAdd() { organization, webhook_credential, webhook_key, + limit, ...templatePayload } = values; templatePayload.inventory = inventory?.id; templatePayload.organization = organization?.id; templatePayload.webhook_credential = webhook_credential?.id; + templatePayload.limit = limit === '' ? null : limit; 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 2d2d83f403..a6cb0e1969 100644 --- a/awx/ui/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.test.js +++ b/awx/ui/src/screens/Template/WorkflowJobTemplateAdd/WorkflowJobTemplateAdd.test.js @@ -113,7 +113,7 @@ describe('', () => { description: '', extra_vars: '---', inventory: undefined, - limit: '', + limit: null, organization: undefined, scm_branch: '', webhook_credential: undefined, diff --git a/awx/ui/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.js b/awx/ui/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.js index d3ab8fb43f..0815f69685 100644 --- a/awx/ui/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.js +++ b/awx/ui/src/screens/Template/WorkflowJobTemplateEdit/WorkflowJobTemplateEdit.js @@ -22,11 +22,13 @@ function WorkflowJobTemplateEdit({ template }) { organization, webhook_credential, webhook_key, + limit, ...templatePayload } = values; templatePayload.inventory = inventory?.id || null; templatePayload.organization = organization?.id || null; templatePayload.webhook_credential = webhook_credential?.id || null; + templatePayload.limit = limit === '' ? null : limit; const formOrgId = organization?.id || inventory?.summary_fields?.organization.id || null;