From 68a797745e70e8e8d207f2866308641f0d42c9e7 Mon Sep 17 00:00:00 2001 From: Kapozux Date: Tue, 17 Nov 2026 19:42:15 +0800 Subject: [PATCH] fix(datasource): remove duplicate CSV check left by merge The merge of main into #1457 kept both the old and the new CSV condition in read_import_dataframe, leaving an `if` with no body. apps/datasource/utils/excel.py fails to import with IndentationError. --- backend/apps/datasource/utils/excel.py | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/apps/datasource/utils/excel.py b/backend/apps/datasource/utils/excel.py index 114751cd..ddaa3f2b 100644 --- a/backend/apps/datasource/utils/excel.py +++ b/backend/apps/datasource/utils/excel.py @@ -56,7 +56,6 @@ def read_import_dataframe(save_path: str, sheet_name: str, field_mapping: dict): for column, field_type in field_mapping.items() } if is_csv_file(save_path): - if save_path.endswith('.csv'): # The CSV parser cannot read datetime64 dtypes directly. datetime_columns = [column for column, field_type in field_mapping.items() if field_type == 'datetime'] for column in datetime_columns: