Explorar o código

Hotfix reverse geocode mismatch

Kirk Trombley %!s(int64=4) %!d(string=hai) anos
pai
achega
8f6ebd69f1
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      server/app/point_gen/shared.py

+ 4 - 1
server/app/point_gen/shared.py

@@ -43,4 +43,7 @@ async def reverse_geocode(lat, lng):
     }
     async with aiohttp_client.get(geonames_url, params=params) as response:
         body = await response.json()
-        return body.get("countryCode", None)
+        country_code = body.get("countryCode", None)
+        if country_code is not None:
+            country_code = country_code.lower()
+        return country_code