Fix settings override bug: allow False and 0 from database

Fixes #217 - Database values of False and 0 are now properly respected
instead of being ignored. Removed 'and v' check that incorrectly treated
these legitimate config values as 'empty'. Now only truly empty values
(None, empty string, empty list, empty dict) are ignored in favor of env.
This commit is contained in:
Shroominic
2025-11-13 16:03:56 +08:00
parent 9a52e30470
commit 94e7b2b4d2
+1 -1
View File
@@ -235,7 +235,7 @@ class SettingsService:
merged_dict: dict[str, Any] = dict(env_resolved.dict())
merged_dict.update(
{k: v for k, v in db_json.items() if v not in (None, "", []) and v}
{k: v for k, v in db_json.items() if v not in (None, "", [], {})}
)
# Ensure primary_mint is consistent with cashu_mints if not explicitly set