Skip to content

Commit

Permalink
terrain parser shouldn't assume "id" is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
ShnitzelX2 committed Nov 14, 2024
1 parent 1540fa8 commit f8d3d7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lang/string_extractor/parsers/terrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@


def parse_terrain(json, origin):
name = get_singular_name(json.get("name", json["id"]))
name = ""
if "name" in json:
name = get_singular_name(json["name"])
write_text(json["name"], origin, comment="Terrain name")
if "description" in json:
write_text(json["description"], origin,
Expand Down

0 comments on commit f8d3d7a

Please sign in to comment.