Don't check whether or not a datasource uses env vars when the function specifically includes the env vars, always fetch them so that they can be returned and put into context for queries to use.
This commit is contained in:
parent
22e1c1cccf
commit
6349b08888
|
@ -43,14 +43,7 @@ export async function get(
|
|||
export async function getWithEnvVars(datasourceId: string) {
|
||||
const appDb = context.getAppDB()
|
||||
const datasource = await appDb.get(datasourceId)
|
||||
const blocks = findHBSBlocks(JSON.stringify(datasource))
|
||||
const usesEnvVars =
|
||||
blocks.find(block => block.includes(ENV_VAR_PREFIX)) != null
|
||||
if (usesEnvVars) {
|
||||
return enrichDatasourceWithValues(datasource)
|
||||
} else {
|
||||
return datasource
|
||||
}
|
||||
}
|
||||
|
||||
export function isValid(datasource: Datasource) {
|
||||
|
|
Loading…
Reference in New Issue