Skip to content

Commit

Permalink
Merge branch 'feat/workflow-backend' into deploy/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
takatost committed Mar 13, 2024
2 parents 9b81b2b + 6ef3542 commit 6857422
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions api/core/workflow/entities/variable_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ class ValueType(Enum):
STRING = "string"
NUMBER = "number"
OBJECT = "object"
ARRAY = "array"
ARRAY_STRING = "array[string]"
ARRAY_NUMBER = "array[number]"
ARRAY_OBJECT = "array[object]"
ARRAY_FILE = "array[file]"
FILE = "file"


Expand Down Expand Up @@ -78,7 +81,10 @@ def get_variable_value(self, variable_selector: list[str],
elif target_value_type == ValueType.OBJECT:
if not isinstance(value, dict):
raise ValueError('Invalid value type: object')
elif target_value_type == ValueType.ARRAY:
elif target_value_type in [ValueType.ARRAY_STRING,
ValueType.ARRAY_NUMBER,
ValueType.ARRAY_OBJECT,
ValueType.ARRAY_FILE]:
if not isinstance(value, list):
raise ValueError('Invalid value type: array')

Expand Down

0 comments on commit 6857422

Please sign in to comment.