@@ -859,9 +859,9 @@ def get_node(
859859
860860 if result :
861861 if include_embedding :
862- properties_json , embedding_json = result
862+ _ , properties_json , embedding_json = result
863863 else :
864- properties_json = result
864+ _ , properties_json = result
865865 embedding_json = None
866866
867867 # Parse properties from JSONB if it's a string
@@ -885,12 +885,14 @@ def get_node(
885885 properties ["embedding" ] = embedding
886886 except (json .JSONDecodeError , TypeError ):
887887 logger .warning (f"Failed to parse embedding for node { id } " )
888-
888+ properties .pop ("id" )
889+ properties .pop ("memory" )
890+ properties .pop ("user_name" , None )
889891 return self ._parse_node (
890892 {
891893 "id" : id ,
892- "memory" : json . loads ( properties [ 1 ]) .get ("memory" , "" ),
893- ** json . loads ( properties [ 1 ]) ,
894+ "memory" : properties .get ("memory" , "" ),
895+ ** properties ,
894896 }
895897 )
896898 return None
@@ -1290,6 +1292,8 @@ def get_subgraph(
12901292
12911293 user_name = user_name if user_name else self ._get_config_value ("user_name" )
12921294
1295+ if center_id .startswith ('"' ) and center_id .endswith ('"' ):
1296+ center_id = center_id [1 :- 1 ]
12931297 # Use a simplified query to get the subgraph (temporarily only direct neighbors)
12941298 """
12951299 SELECT * FROM cypher('{self.db_name}_graph', $$
0 commit comments