Reset schema mutations on erroring
This commit is contained in:
parent
326a90a41e
commit
dad689c787
|
@ -24,6 +24,8 @@
|
||||||
await datasource.actions.saveSchemaMutations()
|
await datasource.actions.saveSchemaMutations()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
notifications.error(e.message)
|
notifications.error(e.message)
|
||||||
|
} finally {
|
||||||
|
datasource.actions.resetSchemaMutations()
|
||||||
}
|
}
|
||||||
dispatch(visible ? "show-column" : "hide-column")
|
dispatch(visible ? "show-column" : "hide-column")
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,6 +204,10 @@ export const createActions = context => {
|
||||||
...$definition,
|
...$definition,
|
||||||
schema: newSchema,
|
schema: newSchema,
|
||||||
})
|
})
|
||||||
|
resetSchemaMutations()
|
||||||
|
}
|
||||||
|
|
||||||
|
const resetSchemaMutations = () => {
|
||||||
schemaMutations.set({})
|
schemaMutations.set({})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,6 +257,7 @@ export const createActions = context => {
|
||||||
addSchemaMutation,
|
addSchemaMutation,
|
||||||
addSchemaMutations,
|
addSchemaMutations,
|
||||||
saveSchemaMutations,
|
saveSchemaMutations,
|
||||||
|
resetSchemaMutations,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue