Skip to content

Commit 8d28ac2

Browse files
committed
refactor: improve default global variable retrieval logic for better clarity
1 parent e7f6199 commit 8d28ac2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

apps/application/flow/step_node/start_node/impl/base_start_node.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717

1818

1919
def get_default_global_variable(input_field_list: List):
20-
return {item.get('variable'): item.get('default_value') for item in input_field_list if
21-
item.get('default_value', None) is not None}
22-
20+
return {
21+
item.get('variable') or item.get('field'): item.get('default_value')
22+
for item in input_field_list
23+
if item.get('default_value', None) is not None
24+
}
2325

2426
def get_global_variable(node):
2527
body = node.workflow_manage.get_body()

0 commit comments

Comments
 (0)