mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 13:11:19 -03:30
Fix null on workflowjobtemplate (#11522)
Fix null on workflowjobtemplate See: https://github.com/ansible/awx/issues/11284
This commit is contained in:
parent
da930ce276
commit
495394084d
@ -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 {
|
||||
|
||||
@ -113,7 +113,7 @@ describe('<WorkflowJobTemplateAdd/>', () => {
|
||||
description: '',
|
||||
extra_vars: '---',
|
||||
inventory: undefined,
|
||||
limit: '',
|
||||
limit: null,
|
||||
organization: undefined,
|
||||
scm_branch: '',
|
||||
webhook_credential: undefined,
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user