fix: Fix variable assign num not working
--bug=1052497 --user=刘瑞斌 【变量赋值】-将全局变量赋值为num类型,输出时报错 https://www.tapd.cn/57709429/s/1659733
This commit is contained in:
parent
c92ad06092
commit
c433c03fc0
@ -30,11 +30,15 @@ class BaseVariableAssignNode(IVariableAssignNode):
|
|||||||
val = json.loads(variable['value'])
|
val = json.loads(variable['value'])
|
||||||
self.workflow_manage.context[variable['fields'][1]] = val
|
self.workflow_manage.context[variable['fields'][1]] = val
|
||||||
result['output_value'] = variable['value'] = val
|
result['output_value'] = variable['value'] = val
|
||||||
else:
|
elif variable['type'] == 'string':
|
||||||
# 变量解析 例如:{{global.xxx}}
|
# 变量解析 例如:{{global.xxx}}
|
||||||
val = self.workflow_manage.generate_prompt(variable['value'])
|
val = self.workflow_manage.generate_prompt(variable['value'])
|
||||||
self.workflow_manage.context[variable['fields'][1]] = val
|
self.workflow_manage.context[variable['fields'][1]] = val
|
||||||
result['output_value'] = val
|
result['output_value'] = val
|
||||||
|
else:
|
||||||
|
val = variable['value']
|
||||||
|
self.workflow_manage.context[variable['fields'][1]] = val
|
||||||
|
result['output_value'] = val
|
||||||
else:
|
else:
|
||||||
reference = self.get_reference_content(variable['reference'])
|
reference = self.get_reference_content(variable['reference'])
|
||||||
self.workflow_manage.context[variable['fields'][1]] = reference
|
self.workflow_manage.context[variable['fields'][1]] = reference
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user