Merge branch 'master' into cleanup/only-fetch-data-when-required

This commit is contained in:
Adria Navarro 2025-01-09 22:17:30 +01:00 committed by GitHub
commit a3b8130702
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ const getDatasourceFetchInstance = datasource => {
if (!handler) { if (!handler) {
return null return null
} }
return new handler({ API, datasource }) return new handler({ API })
} }
/** /**
@ -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(definition) schema = instance.getSchema(datasource, definition)
} else if (definition.parameters?.length) { } else if (definition.parameters?.length) {
schema = {} schema = {}
definition.parameters.forEach(param => { definition.parameters.forEach(param => {