瀏覽代碼

fix: type error in list-operator (#22803)

tags/1.7.1
呆萌闷油瓶 3 月之前
父節點
當前提交
371fe7a700
沒有連結到貢獻者的電子郵件帳戶。

+ 3
- 4
api/core/workflow/nodes/list_operator/node.py 查看文件

value = int(self.graph_runtime_state.variable_pool.convert_template(self._node_data.extract_by.serial).text) value = int(self.graph_runtime_state.variable_pool.convert_template(self._node_data.extract_by.serial).text)
if value < 1: if value < 1:
raise ValueError(f"Invalid serial index: must be >= 1, got {value}") raise ValueError(f"Invalid serial index: must be >= 1, got {value}")
if value > len(variable.value):
raise InvalidKeyError(f"Invalid serial index: must be <= {len(variable.value)}, got {value}")
value -= 1 value -= 1
if len(variable.value) > int(value):
result = variable.value[value]
else:
result = ""
result = variable.value[value]
return variable.model_copy(update={"value": [result]}) return variable.model_copy(update={"value": [result]})





+ 0
- 1
web/app/components/base/date-and-time-picker/common/option-list-item.tsx 查看文件

useEffect(() => { useEffect(() => {
if (isSelected && !noAutoScroll) if (isSelected && !noAutoScroll)
listItemRef.current?.scrollIntoView({ behavior: 'instant' }) listItemRef.current?.scrollIntoView({ behavior: 'instant' })
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []) }, [])


return ( return (

+ 0
- 1
web/app/components/base/date-and-time-picker/time-picker/index.tsx 查看文件

else { else {
setSelectedTime(prev => prev ? getDateWithTimezone({ date: prev, timezone }) : undefined) setSelectedTime(prev => prev ? getDateWithTimezone({ date: prev, timezone }) : undefined)
} }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [timezone]) }, [timezone])


const handleClickTrigger = (e: React.MouseEvent) => { const handleClickTrigger = (e: React.MouseEvent) => {

+ 0
- 1
web/app/components/plugins/plugin-page/index.tsx 查看文件

showInstallFromMarketplace() showInstallFromMarketplace()
} }
})() })()
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [packageId, bundleInfo]) }, [packageId, bundleInfo])


const { const {

+ 0
- 1
web/service/use-plugins.ts 查看文件

refreshPluginList(category ? { category } as any : undefined, !category) refreshPluginList(category ? { category } as any : undefined, !category)
} }
} }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isRefetching]) }, [isRefetching])


const handleRefetch = useCallback(() => { const handleRefetch = useCallback(() => {

Loading…
取消
儲存