Skip to content

Commit

Permalink
fix: XLS, XLSX, CSV file upload lost data (#2150)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaohuzhang1 authored Feb 7, 2025
1 parent 808fc7c commit a3d6083
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/common/handle/impl/csv_split_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def handle(self, file, pattern_list: List, with_filter: bool, limit: int, get_bu
result_item_content += next_md_content
else:
paragraphs.append({'content': result_item_content, 'title': ''})
result_item_content = ''
result_item_content = next_md_content
if len(result_item_content) > 0:
paragraphs.append({'content': result_item_content, 'title': ''})
return result
Expand Down
2 changes: 1 addition & 1 deletion apps/common/handle/impl/xls_split_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def handle_sheet(file_name, sheet, limit: int):
result_item_content += next_md_content
else:
paragraphs.append({'content': result_item_content, 'title': ''})
result_item_content = ''
result_item_content = next_md_content
if len(result_item_content) > 0:
paragraphs.append({'content': result_item_content, 'title': ''})
return result
Expand Down
2 changes: 1 addition & 1 deletion apps/common/handle/impl/xlsx_split_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def handle_sheet(file_name, sheet, image_dict, limit: int):
result_item_content += next_md_content
else:
paragraphs.append({'content': result_item_content, 'title': ''})
result_item_content = ''
result_item_content = next_md_content
if len(result_item_content) > 0:
paragraphs.append({'content': result_item_content, 'title': ''})
return result
Expand Down

0 comments on commit a3d6083

Please sign in to comment.