fix: value_type check failed when updating variables (#24274)
Co-authored-by: me <zhouxi@tellers.cn>
This commit is contained in:
parent
a183b2affb
commit
0e1dfb4161
1 changed files with 1 additions and 2 deletions
|
|
@ -126,7 +126,7 @@ class SegmentType(StrEnum):
|
||||||
"""
|
"""
|
||||||
if self.is_array_type():
|
if self.is_array_type():
|
||||||
return self._validate_array(value, array_validation)
|
return self._validate_array(value, array_validation)
|
||||||
elif self == SegmentType.NUMBER:
|
elif self in [SegmentType.INTEGER, SegmentType.FLOAT, SegmentType.NUMBER]:
|
||||||
return isinstance(value, (int, float))
|
return isinstance(value, (int, float))
|
||||||
elif self == SegmentType.STRING:
|
elif self == SegmentType.STRING:
|
||||||
return isinstance(value, str)
|
return isinstance(value, str)
|
||||||
|
|
@ -166,7 +166,6 @@ _ARRAY_TYPES = frozenset(
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
_NUMERICAL_TYPES = frozenset(
|
_NUMERICAL_TYPES = frozenset(
|
||||||
[
|
[
|
||||||
SegmentType.NUMBER,
|
SegmentType.NUMBER,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue