Skip to content

Commit

Permalink
Merge pull request #15197 from Budibase/fix/datasource-store-bug
Browse files Browse the repository at this point in the history
Datasource fetch schema fix
  • Loading branch information
mike12345567 authored Dec 17, 2024
2 parents 1b6f113 + e233e26 commit 6decd74
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/builder/src/stores/builder/datasources.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ export function createDatasourcesStore() {
}

const updateSchema = async (datasource, tablesFilter) => {
const response = await API.buildDatasourceSchema({
datasourceId: datasource?._id,
tablesFilter,
})
const response = await API.buildDatasourceSchema(
datasource?._id,
tablesFilter
)
updateDatasource(response)
}

Expand Down Expand Up @@ -155,10 +155,7 @@ export function createDatasourcesStore() {
if (!datasource?._id || !datasource?._rev) {
return
}
await API.deleteDatasource({
datasourceId: datasource._id,
datasourceRev: datasource._rev,
})
await API.deleteDatasource(datasource._id, datasource._rev)
replaceDatasource(datasource._id, null)
}

Expand Down

0 comments on commit 6decd74

Please sign in to comment.