Merge pull request #12127 from Budibase/fix/12121-datasource-error-stopping-creation
Datasource errors blocking full creation steps
This commit is contained in:
commit
89d6486ba0
|
@ -81,9 +81,9 @@ export function createDatasourcesStore() {
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
const updateDatasource = response => {
|
const updateDatasource = (response, { ignoreErrors } = {}) => {
|
||||||
const { datasource, errors } = response
|
const { datasource, errors } = response
|
||||||
if (errors && Object.keys(errors).length > 0) {
|
if (!ignoreErrors && errors && Object.keys(errors).length > 0) {
|
||||||
throw new TableImportError(errors)
|
throw new TableImportError(errors)
|
||||||
}
|
}
|
||||||
replaceDatasource(datasource._id, datasource)
|
replaceDatasource(datasource._id, datasource)
|
||||||
|
@ -137,7 +137,7 @@ export function createDatasourcesStore() {
|
||||||
fetchSchema: integration.plus,
|
fetchSchema: integration.plus,
|
||||||
})
|
})
|
||||||
|
|
||||||
return updateDatasource(response)
|
return updateDatasource(response, { ignoreErrors: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
const update = async ({ integration, datasource }) => {
|
const update = async ({ integration, datasource }) => {
|
||||||
|
|
Loading…
Reference in New Issue