Skip to content

Commit c0cc3e4

Browse files
committed
fix: Continue and break to fill in conversation details
1 parent d26b61f commit c0cc3e4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

apps/application/flow/step_node/loop_break_node/impl/base_loop_break_node.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def execute(self, condition, condition_list, **kwargs) -> NodeResult:
2828
is_break = all(r) if condition == 'and' else any(r)
2929
if is_break:
3030
self.node_params['is_result'] = True
31+
self.context['is_break'] = is_break
3132
return NodeResult({'is_break': is_break}, {},
3233
_write_context=_write_context,
3334
_is_interrupt=lambda n, v, w: is_break)
@@ -50,7 +51,7 @@ def get_details(self, index: int, **kwargs):
5051
return {
5152
'name': self.node.properties.get('stepName'),
5253
"index": index,
53-
"question": self.context.get('question'),
54+
'is_break': self.context.get('is_break'),
5455
'run_time': self.context.get('run_time'),
5556
'type': self.node.type,
5657
'status': self.status,

apps/application/flow/step_node/loop_continue_node/impl/base_loop_continue_node.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def execute(self, condition, condition_list, **kwargs) -> NodeResult:
1818
condition_list = [self.assertion(row.get('field'), row.get('compare'), row.get('value')) for row in
1919
condition_list]
2020
is_continue = all(condition_list) if condition == 'and' else any(condition_list)
21+
self.context['is_continue'] = is_continue
2122
if is_continue:
2223
return NodeResult({'is_continue': is_continue, 'branch_id': 'continue'}, {})
2324
return NodeResult({'is_continue': is_continue}, {})
@@ -40,7 +41,7 @@ def get_details(self, index: int, **kwargs):
4041
return {
4142
'name': self.node.properties.get('stepName'),
4243
"index": index,
43-
"question": self.context.get('question'),
44+
"is_continue": self.context.get('is_continue'),
4445
'run_time': self.context.get('run_time'),
4546
'type': self.node.type,
4647
'status': self.status,

0 commit comments

Comments
 (0)