From 5a99e4ace1f25552b413718c35d4380300d27bcf Mon Sep 17 00:00:00 2001 From: hishizuka <12926652+hishizuka@users.noreply.github.com> Date: Tue, 10 Oct 2023 22:45:04 +0900 Subject: [PATCH] fixed --- modules/helper/api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/helper/api.py b/modules/helper/api.py index 9edba1eb..147e99b2 100644 --- a/modules/helper/api.py +++ b/modules/helper/api.py @@ -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 @@ -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: