Skip to content

Commit

Permalink
fix: fixed the build
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosFdez committed Mar 7, 2020
1 parent 26a6923 commit 222bb33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mhdata/build/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ def build_charms(session : sqlalchemy.orm.Session, mhdata):
))

# Add Charm Recipe
if entry['craft']:
if entry.get('craft'):
for item_en, quantity in datafn.iter_recipe(entry['craft'][0]):
item_id = item_map.id_of('en', item_en)
ensure(item_id, f"Charm {entry.name('en')} refers to " +
Expand Down
2 changes: 1 addition & 1 deletion mhdata/load/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def validate_charms(mhdata):
errors.append(f"Skill {skill_name} in charms does not exist")

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


Expand Down

0 comments on commit 222bb33

Please sign in to comment.