Merge pull request #15197 from Budibase/fix/datasource-store-bug
Datasource fetch schema fix
This commit is contained in:
commit
6decd74495
|
@ -93,10 +93,10 @@ export function createDatasourcesStore() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const updateSchema = async (datasource, tablesFilter) => {
|
const updateSchema = async (datasource, tablesFilter) => {
|
||||||
const response = await API.buildDatasourceSchema({
|
const response = await API.buildDatasourceSchema(
|
||||||
datasourceId: datasource?._id,
|
datasource?._id,
|
||||||
tablesFilter,
|
tablesFilter
|
||||||
})
|
)
|
||||||
updateDatasource(response)
|
updateDatasource(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,10 +155,7 @@ export function createDatasourcesStore() {
|
||||||
if (!datasource?._id || !datasource?._rev) {
|
if (!datasource?._id || !datasource?._rev) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
await API.deleteDatasource({
|
await API.deleteDatasource(datasource._id, datasource._rev)
|
||||||
datasourceId: datasource._id,
|
|
||||||
datasourceRev: datasource._rev,
|
|
||||||
})
|
|
||||||
replaceDatasource(datasource._id, null)
|
replaceDatasource(datasource._id, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue