mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Merge pull request #6625 from marshmalien/jt-form-bugs
Fix JT form playbook select error message and more Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
7ddd4d74c0
@ -108,10 +108,7 @@ class JobTemplateEdit extends Component {
|
||||
try {
|
||||
await JobTemplatesAPI.update(template.id, remainingValues);
|
||||
await Promise.all([
|
||||
this.submitLabels(
|
||||
labels,
|
||||
values.project.summary_fields.organization.id
|
||||
),
|
||||
this.submitLabels(labels, template?.organization),
|
||||
this.submitInstanceGroups(instanceGroups, initialInstanceGroups),
|
||||
this.submitCredentials(credentials),
|
||||
]);
|
||||
|
||||
@ -52,7 +52,7 @@ function JobTemplateForm({
|
||||
i18n,
|
||||
}) {
|
||||
const [contentError, setContentError] = useState(false);
|
||||
const [project, setProject] = useState(null);
|
||||
const [project, setProject] = useState(template?.summary_fields?.project);
|
||||
const [inventory, setInventory] = useState(
|
||||
template?.summary_fields?.inventory
|
||||
);
|
||||
@ -282,6 +282,7 @@ function JobTemplateForm({
|
||||
<FormGroup
|
||||
fieldId="template-playbook"
|
||||
helperTextInvalid={playbookMeta.error}
|
||||
isValid={!playbookMeta.touched || !playbookMeta.error}
|
||||
isRequired
|
||||
label={i18n._(t`Playbook`)}
|
||||
>
|
||||
|
||||
@ -70,7 +70,7 @@ export const JobTemplate = shape({
|
||||
inventory: number,
|
||||
job_type: oneOf(['run', 'check']),
|
||||
playbook: string,
|
||||
project: shape({}),
|
||||
project: number,
|
||||
});
|
||||
|
||||
export const Inventory = shape({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user