From 9fdd789f808031a0bafa42021bf9fdccc1f024fb Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sat, 20 Jul 2024 09:28:57 -0700 Subject: [PATCH] Update locationdata.py --- modules/locationdata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/locationdata.py b/modules/locationdata.py index b7ec979..1bb50ba 100644 --- a/modules/locationdata.py +++ b/modules/locationdata.py @@ -45,10 +45,10 @@ def get_tide(lat=0, lon=0): else: return ERROR_FETCHING_DATA + station_id = station_json['stationList'][0]['stationId'] + if station_id is None: return "no station found" - - station_id = station_json['stationList'][0]['stationId'] except (requests.exceptions.RequestException, json.JSONDecodeError): return ERROR_FETCHING_DATA