Skip to content

Commit de6a04b

Browse files
fix
1 parent 92cd721 commit de6a04b

5 files changed

Lines changed: 10 additions & 9 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,23 +80,23 @@ def handle(self, variable, evaluation):
8080
val = variable['value']
8181
else:
8282
val = json.loads(variable['value'])
83-
val = self.convert(val, variable['target_type'])
83+
val = self.convert(val, variable.get('target_type'))
8484
evaluation(variable, val)
8585
result['output_value'] = variable['value'] = val
8686
elif variable['type'] == 'string':
8787
# 变量解析 例如:{{global.xxx}}
8888
val = self.workflow_manage.generate_prompt(variable['value'])
89-
val = self.convert(val, variable['target_type'])
89+
val = self.convert(val, variable.get('target_type'))
9090
evaluation(variable, val)
9191
result['output_value'] = val
9292
else:
9393
val = variable['value']
94-
val = self.convert(val, variable['target_type'])
94+
val = self.convert(val, variable.get('target_type'))
9595
evaluation(variable, val)
9696
result['output_value'] = val
9797
else:
9898
reference = self.get_reference_content(variable['reference'])
99-
reference = self.convert(reference, variable['target_type'])
99+
reference = self.convert(reference, variable.get('target_type'))
100100
evaluation(variable, reference)
101101
result['output_value'] = reference
102102
return result

ui/src/locales/lang/en-US/workflow.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ You are a master of problem optimization, adept at accurately inferring user int
318318
text: 'Update the value of the global variable',
319319
assign: 'Set Value',
320320
convertType: 'Convert type',
321+
doNotConvert: 'Do not convert',
321322
},
322323
variableAggregationNode: {
323324
label: 'Variable Aggregation',

ui/src/locales/lang/zh-CN/workflow.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ export default {
317317
text: '更新全局变量的值',
318318
assign: '赋值',
319319
convertType: '转换类型',
320+
doNotConvert: '不转换',
320321
},
321322
mcpNode: {
322323
label: 'MCP 调用',

ui/src/locales/lang/zh-Hant/workflow.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ export default {
317317
text: '更新全域變數的值',
318318
assign: '賦值',
319319
convertType: '轉換類型',
320+
doNotConvert: '不轉換',
320321
},
321322
variableAggregationNode: {
322323
label: '變量聚合',

ui/src/workflow/nodes/variable-assign-node/index.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,8 @@
123123
<CodemirrorEditor
124124
title="JSON"
125125
v-model="item.value"
126-
:style="{
127-
height: '100px',
128-
width: '155px',
129-
}"
126+
class="w-full"
127+
style="height: 100px"
130128
@submitDialog="(val: string) => (form_data.variable_list[index].value = val)"
131129
/>
132130
</el-form-item>
@@ -191,7 +189,7 @@ const props = defineProps<{ nodeModel: any }>()
191189
192190
const typeOptions = ['string', 'num', 'json', 'bool']
193191
const targetTypeOptions = [
194-
{ label: t('workflow.nodes.variableAssignNode.convertType'), key: '' },
192+
{ label: t('workflow.nodes.variableAssignNode.doNotConvert'), key: '' },
195193
{ label: 'string', key: 'string' },
196194
{ label: 'int', key: 'int' },
197195
{ label: 'float', key: 'float' },

0 commit comments

Comments
 (0)