Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

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

Wang Qi45d676bc05d0
diff --git a/api/apps/services/dataset_api_service.py b/api/apps/services/dataset_api_service.py
index 9e49596539..d2b4497da8 100644
--- a/api/apps/services/dataset_api_service.py
+++ b/api/apps/services/dataset_api_service.py
@@ -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