File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ async def _handle_single_entity_extraction(
7676 record_attributes : list [str ],
7777 chunk_key : str ,
7878):
79- if record_attributes [0 ] != '"entity"' or len ( record_attributes ) < 4 :
79+ if len ( record_attributes ) < 4 or record_attributes [0 ] != '"entity"' :
8080 return None
8181 # add this record as a node in the G
8282 entity_name = clean_str (record_attributes [1 ].upper ())
@@ -97,7 +97,7 @@ async def _handle_single_relationship_extraction(
9797 record_attributes : list [str ],
9898 chunk_key : str ,
9999):
100- if record_attributes [0 ] != '"relationship"' or len ( record_attributes ) < 5 :
100+ if len ( record_attributes ) < 5 or record_attributes [0 ] != '"relationship"' :
101101 return None
102102 # add this record as edge
103103 source = clean_str (record_attributes [1 ].upper ())
You can’t perform that action at this time.
0 commit comments