fix geo lookup in python3, fixes #3019

This commit is contained in:
j 2017-04-19 16:34:34 +02:00
parent cd66553e99
commit a175238d09
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ class SessionData(models.Model):
country = ox.get_country_name(location['country_code'])
if location['city']:
city = location['city']
if type(city) != unicode:
if isinstance(city, bytes):
city = city.decode('latin-1')
self.location = u'%s, %s' % (city, country)
self.location_sort = u'%s, %s' % (country, city)