Fix delete graphrag not take effect in UI (#14879)

### What problem does this PR solve?

Fix delete graphrag not take effect in UI

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Wang Qi
2026-05-13 13:49:16 +08:00
committed by GitHub
parent 733d75d6a7
commit 45d676bc05

View File

@ -452,6 +452,10 @@ def delete_knowledge_graph(dataset_id: str, tenant_id: str):
# Wiping the graph invalidates any phase-completion markers used to
# short-circuit resolution / community detection on resume.
clear_phase_markers(dataset_id)
KnowledgebaseService.update_by_id(
kb.id,
{"graphrag_task_id": "", "graphrag_task_finish_at": None},
)
return True, True