From d06086bdd54cc1a280860b11eff0c6a4e6a67e24 Mon Sep 17 00:00:00 2001 From: Wojciech Zyla Date: Thu, 6 Jul 2023 14:32:46 +0200 Subject: [PATCH] change conversion to int and float --- backend/SC4SNMP_UI_backend/common/conversions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/SC4SNMP_UI_backend/common/conversions.py b/backend/SC4SNMP_UI_backend/common/conversions.py index e41cd36..1c9262f 100644 --- a/backend/SC4SNMP_UI_backend/common/conversions.py +++ b/backend/SC4SNMP_UI_backend/common/conversions.py @@ -67,6 +67,8 @@ def __init__(self, *args, **kwargs): def __string_value_to_numeric(self, value: str): if value.isnumeric(): value = int(value) + elif value.replace(".", "").isnumeric(): + value = float(value) return value def _backend2ui_map(self, document: dict, **kwargs):