소스 검색

Hotfix reverse geocode mismatch

Kirk Trombley 4 년 전
부모
커밋
8f6ebd69f1
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  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