Skip to content

Commit

Permalink
better code
Browse files Browse the repository at this point in the history
  • Loading branch information
mfshao committed Oct 22, 2024
1 parent 8afe7ad commit 4cbdf81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pfb/importers/gen3dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def _array_type(property_type):
if "description" in property_type:
enum["name"] = property_type["description"]
else:
enum["name"] = property_type["term"]["termDef"]["term"]
enum["name"] = property_type.get("term", {}).get("termDef", {}).get("term")
if enum["name"] is None:
# This final fallback is to a value that was being used before
enum["name"] = property_type["termDef"][0]["term"]
Expand Down

0 comments on commit 4cbdf81

Please sign in to comment.