mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-07-23 22:14:26 +08:00
fix/array file cannot use in iteration node (#12035)
Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
82134a1d50
commit
094343739b
@ -90,5 +90,5 @@ class FileVariable(FileSegment, Variable):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class ArrayFileVariable(ArrayFileSegment, Variable):
|
class ArrayFileVariable(ArrayFileSegment, ArrayVariable):
|
||||||
pass
|
pass
|
||||||
|
@ -2,6 +2,8 @@ import pytest
|
|||||||
from pydantic import ValidationError
|
from pydantic import ValidationError
|
||||||
|
|
||||||
from core.variables import (
|
from core.variables import (
|
||||||
|
ArrayFileVariable,
|
||||||
|
ArrayVariable,
|
||||||
FloatVariable,
|
FloatVariable,
|
||||||
IntegerVariable,
|
IntegerVariable,
|
||||||
ObjectVariable,
|
ObjectVariable,
|
||||||
@ -81,3 +83,8 @@ def test_variable_to_object():
|
|||||||
assert var.to_object() == 3.14
|
assert var.to_object() == 3.14
|
||||||
var = SecretVariable(name="secret", value="secret_value")
|
var = SecretVariable(name="secret", value="secret_value")
|
||||||
assert var.to_object() == "secret_value"
|
assert var.to_object() == "secret_value"
|
||||||
|
|
||||||
|
|
||||||
|
def test_array_file_variable_is_array_variable():
|
||||||
|
var = ArrayFileVariable(name="files", value=[])
|
||||||
|
assert isinstance(var, ArrayVariable)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user