Skip to content

Commit 0372681

Browse files
committed
fix: fix the defect where the exported log field is empty
--bug=1049645 --user=王孝刚 【应用】应用编排嵌入高级编排应用,导出对话日志文件的优化后问题字段没有值 https://www.tapd.cn/57709429/s/1635887
1 parent 0cd9c8f commit 0372681

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/application/serializers/chat_serializers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,8 @@ def paragraph_list_to_string(paragraph_list):
176176
@staticmethod
177177
def to_row(row: Dict):
178178
details = row.get('details')
179-
padding_problem_text = details.get('problem_padding').get(
180-
'padding_problem_text') if 'problem_padding' in details and 'padding_problem_text' in details.get(
181-
'problem_padding') else ""
179+
padding_problem_text = ' '.join(node.get("answer", "") for key, node in details.items() if
180+
node.get("type") == 'question-node')
182181
search_dataset_node_list = [(key, node) for key, node in details.items() if
183182
node.get("type") == 'search-dataset-node' or node.get(
184183
"step_type") == 'search_step']
@@ -194,6 +193,7 @@ def to_row(row: Dict):
194193
[])) for
195194
key, node in search_dataset_node_list])
196195
improve_paragraph_list = row.get('improve_paragraph_list')
196+
197197
vote_status_map = {'-1': '未投票', '0': '赞同', '1': '反对'}
198198
return [str(row.get('chat_id')), row.get('abstract'), row.get('problem_text'), padding_problem_text,
199199
row.get('answer_text'), vote_status_map.get(row.get('vote_status')), reference_paragraph_len,

0 commit comments

Comments
 (0)