From 9c7d01d78266eb377d7c35c9ef752e952e30b8f9 Mon Sep 17 00:00:00 2001 From: sylvain-morin Date: Thu, 15 Feb 2024 13:15:13 +0100 Subject: [PATCH] Test --- lib/inat_vision_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/inat_vision_api.py b/lib/inat_vision_api.py index 5a22e0f..726306d 100644 --- a/lib/inat_vision_api.py +++ b/lib/inat_vision_api.py @@ -244,7 +244,7 @@ def download_observation(self, observation_id, image_uuid): data = json.loads(response.read()) if (data is None or data["results"] is None or len ( data["results"] ) == 0 or data["results"][0] is None or data["results"][0]["photos"] is None or len ( data["results"][0]["photos"] ) == 0 or data["results"][0]["photos"][0] is - None or data["results"][0]["photos"][0]["url"] is None): + None or data["results"][0]["photos"][0]["url"] is None or data["results"][0]["taxon"] is None or data["results"][0]["taxon"]["iconic_taxon_id"] is None): return None, None, None, None # download the first image if it isn't already cached if not os.path.exists(cache_path):