From 13bf570a0609e20f7ee9a680f6c415e94ca4a8e6 Mon Sep 17 00:00:00 2001 From: tokebe <43009413+tokebe@users.noreply.github.com> Date: Tue, 12 Mar 2024 21:04:18 -0400 Subject: [PATCH] handle GBIF result without type --- niclassify/core/utilities/ftprep_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/niclassify/core/utilities/ftprep_utils.py b/niclassify/core/utilities/ftprep_utils.py index 92bcb299..12a5d37b 100644 --- a/niclassify/core/utilities/ftprep_utils.py +++ b/niclassify/core/utilities/ftprep_utils.py @@ -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: