Эх сурвалжийг харах

Hotfix reverse geocode mismatch

Kirk Trombley 4 жил өмнө
parent
commit
8f6ebd69f1

+ 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