Update gui_utils.py

pull/2486/head
CoderShady 2 weeks ago committed by GitHub
parent d1449f1ed6
commit b55f20b0c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -44,9 +44,11 @@ def check(value, checks):
if value == "False":
value = ""
TYPE_MAP = {"bool": bool, "int": int, "float": float, "str": str}
if not incorrect and "type" in checks:
try:
value = eval(checks["type"])(value) # fixme remove eval
value = TYPE_MAP.get(checks["type"], str)(value)
except Exception:
incorrect = True

Loading…
Cancel
Save