Skip to content

Commit 610d929

Browse files
authored
fix datatype of compare value to string
since the allowed_values[] are defined as strings, the compare values must be casted as well.
1 parent a980520 commit 610d929

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dataset_features_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ def validate_fields(self, feature):
990990
if constraints.get('allowMulti', False):
991991
value_set = ast.literal_eval(value)
992992
for val in value_set:
993-
if val not in allowed_values:
993+
if str(val) not in allowed_values:
994994
errors.append(self.translator.tr("validation.invalid_value_for") % (attr))
995995
else:
996996
if str(value) not in allowed_values:

0 commit comments

Comments
 (0)