fix: 修复QA文件解析失败 (#933)
This commit is contained in:
parent
6f2d437ac8
commit
b3c7120372
@ -31,6 +31,7 @@ def handle_sheet(file_name, sheet):
|
||||
problem_list = [{'content': p[0:255]} for p in problem.split('\n') if len(p.strip()) > 0]
|
||||
title = get_row_value(row, title_row_index_dict, 'title')
|
||||
title = str(title) if title is not None else ''
|
||||
content = str(content)
|
||||
paragraph_list.append({'title': title[0:255],
|
||||
'content': content[0:4096],
|
||||
'problem_list': problem_list})
|
||||
|
||||
@ -33,7 +33,7 @@ def handle_sheet(file_name, sheet):
|
||||
problem_list = [{'content': p[0:255]} for p in problem.split('\n') if len(p.strip()) > 0]
|
||||
title = get_row_value(row, title_row_index_dict, 'title')
|
||||
title = str(title.value) if title is not None and title.value is not None else ''
|
||||
content = content.value
|
||||
content = str(content.value)
|
||||
paragraph_list.append({'title': title[0:255],
|
||||
'content': content[0:4096],
|
||||
'problem_list': problem_list})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user