Sometimes the address->country field is missing

This commit is contained in:
Edward Betts 2022-04-17 17:06:46 +01:00
parent 82b0405ab7
commit a81cedaae0
1 changed files with 2 additions and 2 deletions

View File

@ -83,8 +83,8 @@ def get_hit_name(hit):
if len(address) == 1:
return n1
country = address.pop("country")
country_code = address.pop("country_code")
country = address.pop("country", None)
country_code = address.pop("country_code", None)
if country_code:
country_code == country_code.lower()