mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Defensive coding
This commit is contained in:
@@ -56,6 +56,7 @@ class POTA(HTTPSpotProvider):
|
||||
# Now we need to look up the name of that reference from the API, because the comment won't have it
|
||||
park_response = self.PARK_DATA_CACHE.get(self.PARK_URL_ROOT + r.upper(), headers=HTTP_HEADERS)
|
||||
park_data = park_response.json()
|
||||
if park_data and "name" in park_data:
|
||||
spot.sig_refs_names.append(park_data["name"])
|
||||
|
||||
# Add to our list. Don't worry about de-duping, removing old spots etc. at this point; other code will do
|
||||
|
||||
Reference in New Issue
Block a user