Skip to content

Commit 5b2321f

Browse files
committed
fix: 修复对话后未生成对话日志
1 parent f547828 commit 5b2321f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

apps/application/flow/workflow_manage.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -552,10 +552,15 @@ def get_answer_text_list(self):
552552
up_node.id):
553553
result.append(node.get_answer_text())
554554
else:
555-
content = result[len(result) - 1]
556-
answer_text = node.get_answer_text()
557-
result[len(result) - 1] += answer_text if len(
558-
content) == 0 else ('\n\n' + answer_text)
555+
if len(result) > 0:
556+
exec_index = len(result) - 1
557+
content = result[exec_index]
558+
result[exec_index] += answer_text if len(
559+
content) == 0 else ('\n\n' + answer_text)
560+
else:
561+
answer_text = node.get_answer_text()
562+
result.insert(0, answer_text)
563+
559564
return result
560565

561566
def get_next_node(self):

0 commit comments

Comments
 (0)