Fix: memory (#12230)

### What problem does this PR solve?

Judge has attr memory_ids

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Lynn
2025-12-26 14:42:47 +08:00
committed by GitHub
parent 5714895291
commit d285d8cd97

View File

@ -427,7 +427,7 @@ class Message(ComponentBase):
logging.error(f"Error converting content to {self._param.output_format}: {e}")
async def _save_to_memory(self, content):
if hasattr(self._param, "memory_ids") and not self._param.memory_ids:
if not hasattr(self._param, "memory_ids") or not self._param.memory_ids:
return True, "No memory selected."
message_dict = {