Skip to content

Commit b3c7120

Browse files
authored
fix: 修复QA文件解析失败 (#933)
1 parent 6f2d437 commit b3c7120

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

apps/common/handle/impl/qa/xls_parse_qa_handle.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def handle_sheet(file_name, sheet):
3131
problem_list = [{'content': p[0:255]} for p in problem.split('\n') if len(p.strip()) > 0]
3232
title = get_row_value(row, title_row_index_dict, 'title')
3333
title = str(title) if title is not None else ''
34+
content = str(content)
3435
paragraph_list.append({'title': title[0:255],
3536
'content': content[0:4096],
3637
'problem_list': problem_list})

apps/common/handle/impl/qa/xlsx_parse_qa_handle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def handle_sheet(file_name, sheet):
3333
problem_list = [{'content': p[0:255]} for p in problem.split('\n') if len(p.strip()) > 0]
3434
title = get_row_value(row, title_row_index_dict, 'title')
3535
title = str(title.value) if title is not None and title.value is not None else ''
36-
content = content.value
36+
content = str(content.value)
3737
paragraph_list.append({'title': title[0:255],
3838
'content': content[0:4096],
3939
'problem_list': problem_list})

0 commit comments

Comments
 (0)