Skip to content

Commit c8c6979

Browse files
Update graphgen/models/reader/csv_reader.py
Co-authored-by: Copilot <[email protected]>
1 parent 6fa1537 commit c8c6979

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphgen/models/reader/csv_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def read(self, file_path: str) -> List[Dict[str, Any]]:
1010

1111
df = pd.read_csv(file_path)
1212
for _, row in df.iterrows():
13-
if row.get("type") == "text" and self.text_column not in row:
13+
if "type" in row and row["type"] == "text" and self.text_column not in row:
1414
raise ValueError(
1515
f"Missing '{self.text_column}' in document: {row.to_dict()}"
1616
)

0 commit comments

Comments
 (0)