Skip to content

Commit 34fbded

Browse files
committed
fix: Knowledge export error
1 parent c255b25 commit 34fbded

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/knowledge/serializers/knowledge.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,8 @@ def _get_knowledge_workbook(data_dict: dict, document_dict: dict, doc_tag_map: d
635635
para_active = para_active_list[row_idx] if row_idx < len(para_active_list) else '1'
636636
# None 转为 ''
637637
row = [col if col is not None else '' for col in row]
638+
# 补齐到3列
639+
row = (row + ['','',''])[:3]
638640
if row_idx == 0:
639641
data.append(
640642
[*row, tags_str, hit_method, similarity, is_active, para_active, doc_type, doc_meta])

0 commit comments

Comments
 (0)