diff options
author | chimeng <chisimon98k@gmail.com> | 2021-05-25 13:14:47 +0800 |
---|---|---|
committer | Lingxian Kong <anlin.kong@gmail.com> | 2021-06-20 03:36:07 +0000 |
commit | 189d3493a844231dfa10062b5e632a3e931e50f2 (patch) | |
tree | 73b6f7d0780aff06f67e002fdd270fead67630e9 | |
parent | 03e5512695f95aae4822c78db9f4cf9ec6eef7f9 (diff) | |
download | trove-189d3493a844231dfa10062b5e632a3e931e50f2.tar.gz |
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
-rw-r--r-- | trove/configuration/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
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 |