From 87c44701d822d1e2270a5c286b8ac4e232635500 Mon Sep 17 00:00:00 2001 From: Dean Date: Sun, 3 Jul 2022 18:55:44 +0100 Subject: [PATCH] Ignore authconfigs for datasources if they are empty --- packages/server/src/threads/query.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/server/src/threads/query.js b/packages/server/src/threads/query.js index de8228ba55..f228f22159 100644 --- a/packages/server/src/threads/query.js +++ b/packages/server/src/threads/query.js @@ -37,10 +37,13 @@ class QueryRunner { throw "Integration type does not exist." } - datasource.config.authConfigs = enrichQueryFields( - datasource.config.authConfigs, - this.ctx - ) + if (datasource.config.authConfigs) { + datasource.config.authConfigs = datasource.config.authConfigs.map( + config => { + return enrichQueryFields(config, this.ctx) + } + ) + } const integration = new Integration(datasource.config)