Merge pull request #15332 from Budibase/fix-form-datasources
Fix issue with forms after cleanup
This commit is contained in:
commit
e4689e9cf5
|
@ -31,7 +31,7 @@ const getDatasourceFetchInstance = datasource => {
|
||||||
if (!handler) {
|
if (!handler) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return new handler({ API })
|
return new handler({ API, datasource })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,7 +52,7 @@ export const fetchDatasourceSchema = async (
|
||||||
// Get the normal schema as long as we aren't wanting a form schema
|
// Get the normal schema as long as we aren't wanting a form schema
|
||||||
let schema
|
let schema
|
||||||
if (datasource?.type !== "query" || !options?.formSchema) {
|
if (datasource?.type !== "query" || !options?.formSchema) {
|
||||||
schema = instance.getSchema(datasource, definition)
|
schema = instance.getSchema(definition)
|
||||||
} else if (definition.parameters?.length) {
|
} else if (definition.parameters?.length) {
|
||||||
schema = {}
|
schema = {}
|
||||||
definition.parameters.forEach(param => {
|
definition.parameters.forEach(param => {
|
||||||
|
|
Loading…
Reference in New Issue