Skip to content

Commit 71ca70c

Browse files
committed
Don't crash if a meta.json isn't provided
1 parent fa569f2 commit 71ca70c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Meta.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class ManualWeb(WebWorld):
2020
# Convert meta.json data to properties
2121
######################################
2222
def set_world_description(base_doc: str) -> str:
23+
if meta_table.get("docs", {}).get("apworld_description", None) is None:
24+
return base_doc
25+
2326
if isinstance(meta_table["docs"]["apworld_description"], str):
2427
base_doc = meta_table["docs"]["apworld_description"]
2528
else:
@@ -68,4 +71,4 @@ def set_world_webworld(web: WebWorld) -> WebWorld:
6871
""")
6972
world_webworld: ManualWeb = set_world_webworld(ManualWeb())
7073

71-
enable_region_diagram = bool(meta_table.get("enable_region_diagram", False))
74+
enable_region_diagram = bool(meta_table.get("enable_region_diagram", False))

0 commit comments

Comments
 (0)