Skip to content

Commit 039efe7

Browse files
committed
feat: Support variable assign dict array value config
1 parent 334d55b commit 039efe7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/application/flow/step_node/variable_assign/impl/base_variable_assign_node.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ def execute(self, variable_list, stream, **kwargs) -> NodeResult:
2424
}
2525
if variable['source'] == 'custom':
2626
if variable['type'] in ['dict', 'array']:
27-
val = json.loads( variable['value'])
27+
if isinstance(variable['value'], dict) or isinstance(variable['value'], list):
28+
val = variable['value']
29+
else:
30+
val = json.loads(variable['value'])
2831
self.workflow_manage.context[variable['fields'][1]] = val
2932
result['output_value'] = variable['value'] = val
3033
else:

0 commit comments

Comments
 (0)