roy's comment

This commit is contained in:
Kayla Man 2023-06-28 15:52:37 +08:00
parent 3c4c922b4f
commit 04ec401343

View file

@ -78,13 +78,15 @@ def read(container) -> dict:
value.startswith(JSON_PREFIX):
with contextlib.suppress(json.JSONDecodeError):
value = json.loads(value[len(JSON_PREFIX):])
if key.strip() == "active":
if value == "true":
data[key.strip()] = True
else:
data[key.strip()] = False
else:
data[key.strip()] = value
# default value behavior
# convert maxscript boolean values
if value == "true":
value = True
elif value == "false":
value = False
data[key.strip()] = value
data["instance_node"] = container.Name