Fix: handle sometimes graph index will miss explanation (#7127)

### What problem does this PR solve?

https://github.com/infiniflow/ragflow/issues/7053

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Stephen Hu
2025-04-18 14:24:36 +08:00
committed by GitHub
parent 86f76df586
commit b1798bafb0

View File

@ -277,7 +277,7 @@ async def extract_community(
for stru, rep in zip(community_structure, community_reports): for stru, rep in zip(community_structure, community_reports):
obj = { obj = {
"report": rep, "report": rep,
"evidences": "\n".join([f["explanation"] for f in stru["findings"]]), "evidences": "\n".join([f.get("explanation", "") for f in stru["findings"]]),
} }
chunk = { chunk = {
"id": get_uuid(), "id": get_uuid(),