fix: use 'is not None and != ""' instead of truthiness for mem0.json merge

The original filter (if v) silently drops False and 0, so
'rerank: false' in mem0.json would be ignored. Use explicit
None/empty-string check to preserve intentional falsy values.
This commit is contained in:
Teknium
2026-04-03 20:36:33 -07:00
committed by Teknium
parent 5e3303b3d8
commit 585a3b40ad

View File

@@ -58,7 +58,8 @@ def _load_config() -> dict:
if config_path.exists():
try:
file_cfg = json.loads(config_path.read_text(encoding="utf-8"))
config.update({k: v for k, v in file_cfg.items() if v})
config.update({k: v for k, v in file_cfg.items()
if v is not None and v != ""})
except Exception:
pass