From eb2e6d0d87d5de59cb8f8e95bd62c3415bda089b Mon Sep 17 00:00:00 2001 From: Alex Potapenko Date: Sat, 14 Dec 2024 12:24:45 +0100 Subject: [PATCH] AGEStorage: fix has_edge(): AGE always returns field names in lower case --- lightrag/kg/age_impl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightrag/kg/age_impl.py b/lightrag/kg/age_impl.py index 8c35d44d..cd4b4f3a 100644 --- a/lightrag/kg/age_impl.py +++ b/lightrag/kg/age_impl.py @@ -370,7 +370,7 @@ class AGEStorage(BaseGraphStorage): query = ( "MATCH (a:`{src_label}`)-[r]-(b:`{tgt_label}`) " - "RETURN COUNT(r) > 0 AS edgeExists" + "RETURN COUNT(r) > 0 AS edge_exists" ) single_result = ( await self._query( @@ -384,7 +384,7 @@ class AGEStorage(BaseGraphStorage): inspect.currentframe().f_code.co_name, single_result[0], ) - return single_result["edgeExists"].lower() == "true" + return single_result["edge_exists"].lower() == "true" async def get_node(self, node_id: str) -> Union[dict, None]: entity_name_label = node_id.strip('"')