From d170f736624a1bf1c4e62f71e08c8e6b37b33002 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Thu, 14 Nov 2019 08:53:10 +0100 Subject: [PATCH] Assign datasource props --- print/config/print.json | 2 +- print/core/config.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/print/config/print.json b/print/config/print.json index a075feed7..ee2ab6f79 100755 --- a/print/config/print.json +++ b/print/config/print.json @@ -8,7 +8,7 @@ "i18n": { "locale": "es", "fallbackLocale": "es", - "silentTranslationWarn": true + "silentTranslationWarn": false }, "pdf": { "format": "A4", diff --git a/print/core/config.js b/print/core/config.js index d07d4f3fc..8db388401 100644 --- a/print/core/config.js +++ b/print/core/config.js @@ -10,8 +10,11 @@ let configFiles = [ ]; for (let configFile of configFiles) { - if (fs.existsSync(configFile)) - Object.assign(config, require(configFile)); + if (fs.existsSync(configFile)) { + const conf = require(configFile); + for (let prop in conf) + Object.assign(config[prop], conf[prop]); + } } config.env = env;