Skip to content

Commit a3d6083

Browse files
authored
fix: XLS, XLSX, CSV file upload lost data (#2150)
1 parent 808fc7c commit a3d6083

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

apps/common/handle/impl/csv_split_handle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def handle(self, file, pattern_list: List, with_filter: bool, limit: int, get_bu
5353
result_item_content += next_md_content
5454
else:
5555
paragraphs.append({'content': result_item_content, 'title': ''})
56-
result_item_content = ''
56+
result_item_content = next_md_content
5757
if len(result_item_content) > 0:
5858
paragraphs.append({'content': result_item_content, 'title': ''})
5959
return result

apps/common/handle/impl/xls_split_handle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def handle_sheet(file_name, sheet, limit: int):
4848
result_item_content += next_md_content
4949
else:
5050
paragraphs.append({'content': result_item_content, 'title': ''})
51-
result_item_content = ''
51+
result_item_content = next_md_content
5252
if len(result_item_content) > 0:
5353
paragraphs.append({'content': result_item_content, 'title': ''})
5454
return result

apps/common/handle/impl/xlsx_split_handle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def handle_sheet(file_name, sheet, image_dict, limit: int):
5454
result_item_content += next_md_content
5555
else:
5656
paragraphs.append({'content': result_item_content, 'title': ''})
57-
result_item_content = ''
57+
result_item_content = next_md_content
5858
if len(result_item_content) > 0:
5959
paragraphs.append({'content': result_item_content, 'title': ''})
6060
return result

0 commit comments

Comments
 (0)