From b22a702a808b273b65adf16d29f542038e6ceea0 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Tue, 23 Jul 2024 14:45:21 +0200 Subject: [PATCH] Fix for non-string numbers --- src/controller/python/chip/yaml/format_converter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/python/chip/yaml/format_converter.py b/src/controller/python/chip/yaml/format_converter.py index 74faa7bb338fe5..1be051155b6040 100644 --- a/src/controller/python/chip/yaml/format_converter.py +++ b/src/controller/python/chip/yaml/format_converter.py @@ -198,7 +198,7 @@ def convert_to_data_model_type(field_value, field_type): return field_value # YAML conversion treats all numbers as ints. Convert to a uint type if the schema # type indicates so. - elif (field_type == uint): + elif (type(field_value) is str and field_type == uint): # Longer number are stored as strings. Need to make this conversion first. # The value can be represented in binary, octal, decimal or hexadecimal # format.