From 7beec078d30214daa755e59a4b494683a6248e02 Mon Sep 17 00:00:00 2001 From: sylvain-morin Date: Thu, 15 Feb 2024 12:47:56 +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 22f61cc..94cde65 100644 --- a/lib/inat_vision_api.py +++ b/lib/inat_vision_api.py @@ -242,7 +242,7 @@ def download_observation(self, observation_id, image_uuid): # fetch observation details using the API response = urllib.request.urlopen(url) data = json.loads(response.read()) - if (data is None or data["results"] is None or len ( data["results"] ) = 0 or data["results"][0] is + 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 data["results"][0]["photos"][0] is None or data["results"][0]["photos"][0]["url"] is None): return None, None, None