[147] fix image load error

This commit is contained in:
meisnate12 2023-03-21 10:31:43 -04:00
parent adbfa21980
commit 9e9aa657aa
3 changed files with 5 additions and 2 deletions

View file

@ -1 +1 @@
1.18.3-develop146
1.18.3-develop147

View file

@ -662,6 +662,9 @@ class MetadataFile(DataFile):
for set_key, set_data in get_dict("sections", data).items():
if not isinstance(set_data, dict):
raise Failed("Image Set Error: Set Data must be a dictionary")
elif "builders" not in set_data or not set_data["builders"]:
logger.trace(f"Skipping No Builder for Section: {set_key}")
continue
elif item_attr not in set_data:
raise Failed(f"Set Data must have the {item_attr} attribute")
elif not set_data[item_attr]:

View file

@ -749,7 +749,7 @@ def parse(error, attribute, data, datatype=None, methods=None, parent=None, defa
if datatype == "dict":
return value
elif datatype == "dictlist":
return {k: v if isinstance(v, list) else [v] for k, v in value.items()}
return {k: v if isinstance(v, list) else [v] if v else [] for k, v in value.items()}
elif datatype == "dictliststr":
return {str(k): [str(y) for y in v] if isinstance(v, list) else [str(v)] for k, v in value.items()}
elif datatype == "strdict":