mirror of
https://github.com/ansible/awx.git
synced 2026-05-14 04:47:44 -02:30
Fix null on workflowjobtemplate (#11522)
Fix null on workflowjobtemplate See: https://github.com/ansible/awx/issues/11284
This commit is contained in:
@@ -23,11 +23,13 @@ function WorkflowJobTemplateAdd() {
|
|||||||
organization,
|
organization,
|
||||||
webhook_credential,
|
webhook_credential,
|
||||||
webhook_key,
|
webhook_key,
|
||||||
|
limit,
|
||||||
...templatePayload
|
...templatePayload
|
||||||
} = values;
|
} = values;
|
||||||
templatePayload.inventory = inventory?.id;
|
templatePayload.inventory = inventory?.id;
|
||||||
templatePayload.organization = organization?.id;
|
templatePayload.organization = organization?.id;
|
||||||
templatePayload.webhook_credential = webhook_credential?.id;
|
templatePayload.webhook_credential = webhook_credential?.id;
|
||||||
|
templatePayload.limit = limit === '' ? null : limit;
|
||||||
const organizationId =
|
const organizationId =
|
||||||
organization?.id || inventory?.summary_fields?.organization.id;
|
organization?.id || inventory?.summary_fields?.organization.id;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ describe('<WorkflowJobTemplateAdd/>', () => {
|
|||||||
description: '',
|
description: '',
|
||||||
extra_vars: '---',
|
extra_vars: '---',
|
||||||
inventory: undefined,
|
inventory: undefined,
|
||||||
limit: '',
|
limit: null,
|
||||||
organization: undefined,
|
organization: undefined,
|
||||||
scm_branch: '',
|
scm_branch: '',
|
||||||
webhook_credential: undefined,
|
webhook_credential: undefined,
|
||||||
|
|||||||
@@ -22,11 +22,13 @@ function WorkflowJobTemplateEdit({ template }) {
|
|||||||
organization,
|
organization,
|
||||||
webhook_credential,
|
webhook_credential,
|
||||||
webhook_key,
|
webhook_key,
|
||||||
|
limit,
|
||||||
...templatePayload
|
...templatePayload
|
||||||
} = values;
|
} = values;
|
||||||
templatePayload.inventory = inventory?.id || null;
|
templatePayload.inventory = inventory?.id || null;
|
||||||
templatePayload.organization = organization?.id || null;
|
templatePayload.organization = organization?.id || null;
|
||||||
templatePayload.webhook_credential = webhook_credential?.id || null;
|
templatePayload.webhook_credential = webhook_credential?.id || null;
|
||||||
|
templatePayload.limit = limit === '' ? null : limit;
|
||||||
|
|
||||||
const formOrgId =
|
const formOrgId =
|
||||||
organization?.id || inventory?.summary_fields?.organization.id || null;
|
organization?.id || inventory?.summary_fields?.organization.id || null;
|
||||||
|
|||||||
Reference in New Issue
Block a user