Skip to content

Commit

Permalink
change conversion to int and float
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekzyla committed Jul 6, 2023
1 parent 4bb483a commit d06086b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/SC4SNMP_UI_backend/common/conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit d06086b

Please sign in to comment.