Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hishizuka committed Oct 10, 2023
1 parent 4c150ce commit 5a99e4a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/helper/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async def get_google_route_from_mapstogpx(self, url):
return response

async def get_openweathermap_data(self, x, y):
if detect_network() or self.config.G_OPENWEATHERMAP_API["TOKEN"] == "":
if not detect_network() or self.config.G_OPENWEATHERMAP_API["TOKEN"] == "":
return None
if np.any(np.isnan([x, y])):
return None
Expand All @@ -115,10 +115,11 @@ async def get_openweathermap_data(self, x, y):

async def get_ridewithgps_route(self, add=False, reset=False):
if (
detect_network()
not detect_network()
or self.config.G_RIDEWITHGPS_API["APIKEY"] == ""
or self.config.G_RIDEWITHGPS_API["TOKEN"] == ""
):
print("return")
return None

if reset:
Expand Down

0 comments on commit 5a99e4a

Please sign in to comment.