Skip to content

Commit 222bb33

Browse files
committed
fix: fixed the build
1 parent 26a6923 commit 222bb33

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mhdata/build/sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ def build_charms(session : sqlalchemy.orm.Session, mhdata):
784784
))
785785

786786
# Add Charm Recipe
787-
if entry['craft']:
787+
if entry.get('craft'):
788788
for item_en, quantity in datafn.iter_recipe(entry['craft'][0]):
789789
item_id = item_map.id_of('en', item_en)
790790
ensure(item_id, f"Charm {entry.name('en')} refers to " +

mhdata/load/validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def validate_charms(mhdata):
331331
errors.append(f"Skill {skill_name} in charms does not exist")
332332

333333
# Currently charms only link to a single recipe, but the schema supports more than one
334-
if len(entry['craft']) > 1:
334+
if len(entry.get('craft', [])) > 1:
335335
errors.append(f"Charm {entry['name_en']} has more than one recipe, which is not supported")
336336

337337

0 commit comments

Comments
 (0)