Merge pull request #15197 from Budibase/fix/datasource-store-bug

Datasource fetch schema fix
This commit is contained in:
Michael Drury 2024-12-17 14:23:15 +00:00 committed by GitHub
commit 6decd74495
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 8 deletions

View File

@ -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)
} }