Skip to content

Commit

Permalink
Fix KeyError if find_mod_update_post looks for a modversion in a file…
Browse files Browse the repository at this point in the history
… that's not an update post
  • Loading branch information
Alexander01998 committed Dec 9, 2024
1 parent 616ac7e commit 33271eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/add_mod_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def find_mod_update_post(mod, version):

post_path = os.path.join(root, file)
front_matter = read_front_matter(post_path)
if front_matter["modversion"] == version:
if front_matter.get("modversion") == version:
return front_matter, post_path

raise ValueError(f"Could not find post for mod {mod} version {version}")
Expand Down

0 comments on commit 33271eb

Please sign in to comment.