From be53247bcdda20f914de06bdc56908ca236234fb Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:44:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E5=90=8E=E6=9C=AA=E7=94=9F=E6=88=90=E5=AF=B9=E8=AF=9D=E6=97=A5?= =?UTF-8?q?=E5=BF=97=20(#1725)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/application/flow/workflow_manage.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/application/flow/workflow_manage.py b/apps/application/flow/workflow_manage.py index b051f043e..c62612c0a 100644 --- a/apps/application/flow/workflow_manage.py +++ b/apps/application/flow/workflow_manage.py @@ -552,10 +552,15 @@ class WorkflowManage: up_node.id): result.append(node.get_answer_text()) else: - content = result[len(result) - 1] - answer_text = node.get_answer_text() - result[len(result) - 1] += answer_text if len( - content) == 0 else ('\n\n' + answer_text) + if len(result) > 0: + exec_index = len(result) - 1 + content = result[exec_index] + result[exec_index] += answer_text if len( + content) == 0 else ('\n\n' + answer_text) + else: + answer_text = node.get_answer_text() + result.insert(0, answer_text) + return result def get_next_node(self):