From cbf86ca7009836d718b171247d6b0de6aef9470d Mon Sep 17 00:00:00 2001 From: Claudemir Todo Bom Date: Fri, 23 Aug 2024 16:25:41 -0300 Subject: [PATCH] helpers/CheckSettings.ts: allow empty default values --- backend/src/helpers/CheckSettings.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/helpers/CheckSettings.ts b/backend/src/helpers/CheckSettings.ts index b6cead7..89059db 100644 --- a/backend/src/helpers/CheckSettings.ts +++ b/backend/src/helpers/CheckSettings.ts @@ -12,7 +12,7 @@ const CheckSettings = async ( } }); - if (!setting && !defaultValue) { + if (!setting && defaultValue === null) { throw new AppError("ERR_NO_SETTING_FOUND", 404); } @@ -31,7 +31,7 @@ export const GetCompanySetting = async ( } }); - if (!setting && !defaultValue) { + if (!setting && defaultValue === null) { throw new AppError("ERR_NO_SETTING_FOUND", 404); }