From 98bf24d51eabed19a727c4c644b53f8e14c0debb Mon Sep 17 00:00:00 2001 From: Frikky Date: Wed, 24 Jan 2024 11:09:00 +0100 Subject: [PATCH] Fixed an integer mapping problem in conditions --- backend/app_sdk/app_base.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backend/app_sdk/app_base.py b/backend/app_sdk/app_base.py index 6c4f05e6..a1a57375 100755 --- a/backend/app_sdk/app_base.py +++ b/backend/app_sdk/app_base.py @@ -2137,6 +2137,12 @@ class AppBase: if isinstance(basejson, list): print("[WARNING] VALUE IN ISINSTANCE IS NOT TO BE USED (list): %s" % value) return basejson, False + elif isinstance(basejson, bool): + print("[WARNING] VALUE IN ISINSTANCE IS NOT TO BE USED (bool): %s" % value) + return basejson, False + elif isinstance(basejson, int): + print("[WARNING] VALUE IN ISINSTANCE IS NOT TO BE USED (int): %s" % value) + return basejson, False elif isinstance(basejson[value], str): try: if (basejson[value].endswith("}") and basejson[value].endswith("}")) or (basejson[value].startswith("[") and basejson[value].endswith("]")): @@ -2159,6 +2165,12 @@ class AppBase: if isinstance(basejson, list): print("[WARNING] VALUE IN ISINSTANCE IS NOT TO BE USED (list): %s" % value) return basejson, False + elif isinstance(basejson, bool): + print("[WARNING] VALUE IN ISINSTANCE IS NOT TO BE USED (bool): %s" % value) + return basejson, False + elif isinstance(basejson, int): + print("[WARNING] VALUE IN ISINSTANCE IS NOT TO BE USED (int): %s" % value) + return basejson, False elif isinstance(basejson[value], str): print(f"[INFO] LOADING STRING '%s' AS JSON" % basejson[value]) try: