From ea006bd386ab2d5a469e22979b2a949c57b990dc Mon Sep 17 00:00:00 2001 From: yangdx Date: Tue, 28 Oct 2025 00:12:23 +0800 Subject: [PATCH] Fix entity update logic to handle renaming operations - Add is_renaming condition check - Ensure updates when entity renamed --- lightrag/utils_graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag/utils_graph.py b/lightrag/utils_graph.py index 0a4dae92..807db641 100644 --- a/lightrag/utils_graph.py +++ b/lightrag/utils_graph.py @@ -409,7 +409,7 @@ async def _edit_entity_impl( source_id_changed = set(new_chunk_ids) != set(old_chunk_ids) - if source_id_changed or not has_stored_data: + if source_id_changed or not has_stored_data or is_renaming: existing_full_chunk_ids = [] if has_stored_data: existing_full_chunk_ids = [