Fix incorrect order of requests for changing SR compatibility lvl (#2201)
This commit is contained in:
parent
9c7f078ded
commit
5cb1a7e0ce
1 changed files with 11 additions and 12 deletions
|
@ -62,18 +62,6 @@ const Edit: React.FC = () => {
|
||||||
if (!schema) return;
|
if (!schema) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (dirtyFields.newSchema || dirtyFields.schemaType) {
|
|
||||||
const resp = await schemasApiClient.createNewSchema({
|
|
||||||
clusterName,
|
|
||||||
newSchemaSubject: {
|
|
||||||
...schema,
|
|
||||||
schema: props.newSchema || schema.schema,
|
|
||||||
schemaType: props.schemaType || schema.schemaType,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
dispatch(schemaAdded(resp));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dirtyFields.compatibilityLevel) {
|
if (dirtyFields.compatibilityLevel) {
|
||||||
await schemasApiClient.updateSchemaCompatibilityLevel({
|
await schemasApiClient.updateSchemaCompatibilityLevel({
|
||||||
clusterName,
|
clusterName,
|
||||||
|
@ -89,6 +77,17 @@ const Edit: React.FC = () => {
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (dirtyFields.newSchema || dirtyFields.schemaType) {
|
||||||
|
const resp = await schemasApiClient.createNewSchema({
|
||||||
|
clusterName,
|
||||||
|
newSchemaSubject: {
|
||||||
|
...schema,
|
||||||
|
schema: props.newSchema || schema.schema,
|
||||||
|
schemaType: props.schemaType || schema.schemaType,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
dispatch(schemaAdded(resp));
|
||||||
|
}
|
||||||
|
|
||||||
navigate(clusterSchemaPath(clusterName, subject));
|
navigate(clusterSchemaPath(clusterName, subject));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue