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

pull/262/head
Igor Chubin 6 years ago
parent 6dfd809694
commit 0f6d8da10c

@ -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:

Loading…
Cancel
Save