Parse None

This commit is contained in:
Jordan Bradford
2024-11-14 22:51:15 -05:00
parent e7555ae29c
commit 9ed2a92585

View File

@@ -317,8 +317,8 @@ def reload_component(component):
def parse_value(value_str):
"""Parse a value string"""
if value_str is None:
return value_str
if value_str.lower() == "none":
return None
if re.match(r"^\d+$", value_str):
return int(value_str)
elif re.match(r"^\d+\.\d*$", value_str):