[147] fix image load error

pull/1351/head
meisnate12 2 years ago
parent adbfa21980
commit 9e9aa657aa

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

@ -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]:

@ -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":

Loading…
Cancel
Save