mirror of
https://github.com/ansible/awx.git
synced 2026-01-26 16:11:30 -03:30
Merge pull request #13340 from gamuniz/change_wf_scmbranch_behavior
Change workflow create/edit to null scm_branch when not provided.
This commit is contained in:
commit
821b1701bf
@ -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 {
|
||||
|
||||
@ -119,7 +119,7 @@ describe('<WorkflowJobTemplateAdd/>', () => {
|
||||
job_tags: null,
|
||||
limit: null,
|
||||
organization: undefined,
|
||||
scm_branch: '',
|
||||
scm_branch: null,
|
||||
skip_tags: null,
|
||||
webhook_credential: undefined,
|
||||
webhook_service: '',
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user