From 189d3493a844231dfa10062b5e632a3e931e50f2 Mon Sep 17 00:00:00 2001 From: chimeng Date: Tue, 25 May 2021 13:14:47 +0800 Subject: Add float types to load_items to support configuration parameters of float type Complement missing float types when loading configuration group parameters so that parameters of type float can be attached into the trove instance successfully Story: 2008917 Task: 42508 Change-Id: Iae4d8fc52a50da4fd347270271f6761ce766d5c3 --- trove/configuration/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trove/configuration/models.py b/trove/configuration/models.py index 8ec97477..983e512b 100644 --- a/trove/configuration/models.py +++ b/trove/configuration/models.py @@ -166,6 +166,8 @@ class Configuration(object): item.configuration_value = bool(int(item.configuration_value)) elif rule.data_type == 'integer': item.configuration_value = int(item.configuration_value) + elif rule.data_type == 'float': + item.configuration_value = float(item.configuration_value) else: item.configuration_value = str(item.configuration_value) return config_items -- cgit v1.2.1