Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/array file cannot use in iteration node #12035

Merged
merged 2 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/core/variables/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ class FileVariable(FileSegment, Variable):
pass


class ArrayFileVariable(ArrayFileSegment, Variable):
class ArrayFileVariable(ArrayFileSegment, ArrayVariable):
laipz8200 marked this conversation as resolved.
Show resolved Hide resolved
pass
7 changes: 7 additions & 0 deletions api/tests/unit_tests/core/app/segments/test_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from pydantic import ValidationError

from core.variables import (
ArrayFileVariable,
ArrayVariable,
FloatVariable,
IntegerVariable,
ObjectVariable,
Expand Down Expand Up @@ -81,3 +83,8 @@ def test_variable_to_object():
assert var.to_object() == 3.14
var = SecretVariable(name="secret", value="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