From 0e1dfb4161b77ab28af63cc18f2b3467b962491b Mon Sep 17 00:00:00 2001 From: me0106 Date: Thu, 21 Aug 2025 15:28:07 +0800 Subject: [PATCH] fix: value_type check failed when updating variables (#24274) Co-authored-by: me --- api/core/variables/types.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/core/variables/types.py b/api/core/variables/types.py index d28fb1140..662905604 100644 --- a/api/core/variables/types.py +++ b/api/core/variables/types.py @@ -126,7 +126,7 @@ class SegmentType(StrEnum): """ if self.is_array_type(): 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)) elif self == SegmentType.STRING: return isinstance(value, str) @@ -166,7 +166,6 @@ _ARRAY_TYPES = frozenset( ] ) - _NUMERICAL_TYPES = frozenset( [ SegmentType.NUMBER,