Skip to content

Commit

Permalink
handle GBIF result without type
Browse files Browse the repository at this point in the history
  • Loading branch information
tokebe committed Mar 13, 2024
1 parent ff9fe85 commit 13bf570
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion niclassify/core/utilities/ftprep_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ def get_native_ranges(species_name):
lookup = [
res["description"]
for res in results["results"]
if res["type"] == "native range"
if ("type" in res and res["type"] == "native range" and "description" in res)
]

if len(lookup) == 0:
Expand Down

0 comments on commit 13bf570

Please sign in to comment.