do not add country name to the GPS coords (fixes #260)

This commit is contained in:
Igor Chubin 2019-01-11 17:27:14 +01:00
parent 6dfd809694
commit 0f6d8da10c

View file

@ -243,7 +243,7 @@ def location_processing(location, ip_addr):
# contains some unicode symbols
# here we resolve them
if location is not None and not ascii_only(location):
location = "~" + location
location = "~" + location.lstrip('~')
if location is not None and location.upper() in IATA_CODES:
location = '~%s' % location
@ -252,7 +252,10 @@ def location_processing(location, ip_addr):
geolocation = geolocator(location_canonical_name(location[1:]))
if geolocation is not None:
override_location_name = location[1:].replace('+', ' ')
if country:
override_location_name += ", %s" % country
location = "%s,%s" % (geolocation['latitude'], geolocation['longitude'])
country = None
if not hide_full_address:
full_address = geolocation['address']
else: