fix: odysseus-memory cmd_add crashes on non-dict existing memory row (#2091)

This commit is contained in:
Afonso Coutinho
2026-07-11 03:05:17 +01:00
committed by GitHub
parent 7a1c7395c0
commit 7b25b6dbdc
2 changed files with 47 additions and 1 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ def cmd_add(args):
# add_entry doesn't save by default — the call in chat does it
# after dedup checks. Persist here so a one-shot CLI add sticks.
all_entries = _manager().load_all()
if not any(e.get("id") == entry.get("id") for e in all_entries):
if not any(isinstance(e, dict) and e.get("id") == entry.get("id") for e in all_entries):
all_entries.append(entry)
_manager().save(all_entries)
emit(entry, args)