mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
Fix playbook error message and JT save bug
This commit is contained in:
parent
285e9c2f62
commit
189a10e35a
@ -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