未验证 提交 8440baa5 编写于 作者: L labbomb 提交者: GitHub

[Bug][UI Next]Fix global variable validation condition for save button in...

[Bug][UI Next]Fix global variable validation condition for save button in workflow definition. (#9454)
上级 51c1d8f2
......@@ -114,16 +114,19 @@ export default defineComponent({
globalParams: {
validator() {
const props = new Set()
const keys = formValue.value.globalParams.map(item => item.key)
const keysSet = new Set(keys)
if (keysSet.size !== keys.length) {
return new Error(t('project.dag.prop_repeat'))
}
for (const param of formValue.value.globalParams) {
const prop = param.value
if (!prop) {
return new Error(t('project.dag.prop_empty'))
}
if (props.has(prop)) {
return new Error(t('project.dag.prop_repeat'))
}
props.add(prop)
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册