1
0
Fork 0
mirror of synced 2024-09-09 22:16:26 +12:00

Reset schema mutations on erroring

This commit is contained in:
Adria Navarro 2024-05-30 14:37:35 +02:00
parent 326a90a41e
commit dad689c787
2 changed files with 7 additions and 0 deletions

View file

@ -24,6 +24,8 @@
await datasource.actions.saveSchemaMutations()
} catch (e) {
notifications.error(e.message)
} finally {
datasource.actions.resetSchemaMutations()
}
dispatch(visible ? "show-column" : "hide-column")
}

View file

@ -204,6 +204,10 @@ export const createActions = context => {
...$definition,
schema: newSchema,
})
resetSchemaMutations()
}
const resetSchemaMutations = () => {
schemaMutations.set({})
}
@ -253,6 +257,7 @@ export const createActions = context => {
addSchemaMutation,
addSchemaMutations,
saveSchemaMutations,
resetSchemaMutations,
},
},
}