From eaf7289af361a344b4f2f8253d078250cce47005 Mon Sep 17 00:00:00 2001 From: Rish Date: Thu, 14 Nov 2019 08:20:16 +0530 Subject: [PATCH] Fixed bulk settings input serializer --- core/server/api/canary/utils/serializers/input/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/api/canary/utils/serializers/input/settings.js b/core/server/api/canary/utils/serializers/input/settings.js index 1e1bff818e..6ba17c0450 100644 --- a/core/server/api/canary/utils/serializers/input/settings.js +++ b/core/server/api/canary/utils/serializers/input/settings.js @@ -52,7 +52,7 @@ module.exports = { //CASE: Ensure we don't store calculated fields `isEnabled/Config` in bulk email settings if (setting.key === 'bulk_email_settings') { - const {apiKey, domain, baseUrl, provider} = setting.value ? JSON.parse(setting.value) : ''; + const {apiKey = '', domain = '', baseUrl = '', provider = 'mailgun'} = setting.value ? JSON.parse(setting.value) : {}; setting.value = JSON.stringify({apiKey, domain, baseUrl, provider}); } });