Exclude entities from datasource env processing (#11000)

This commit is contained in:
melohagan 2023-06-22 17:35:47 +01:00 committed by GitHub
parent 35c394c05d
commit 0860a5b248
1 changed files with 4 additions and 1 deletions

View File

@ -36,11 +36,14 @@ export function checkDatasourceTypes(schema: Integration, config: any) {
async function enrichDatasourceWithValues(datasource: Datasource) {
const cloned = cloneDeep(datasource)
const env = await getEnvironmentVariables()
//Do not process entities, as we do not want to process formulas
const { entities, ...clonedWithoutEntities } = cloned
const processed = processObjectSync(
cloned,
clonedWithoutEntities,
{ env },
{ onlyFound: true }
) as Datasource
processed.entities = entities
const definition = await getDefinition(processed.source)
processed.config = checkDatasourceTypes(definition!, processed.config)
return {