forked from 0x2620/pandora
fix geo lookup in python3, fixes #3019
This commit is contained in:
parent
cd66553e99
commit
a175238d09
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ class SessionData(models.Model):
|
||||||
country = ox.get_country_name(location['country_code'])
|
country = ox.get_country_name(location['country_code'])
|
||||||
if location['city']:
|
if location['city']:
|
||||||
city = location['city']
|
city = location['city']
|
||||||
if type(city) != unicode:
|
if isinstance(city, bytes):
|
||||||
city = city.decode('latin-1')
|
city = city.decode('latin-1')
|
||||||
self.location = u'%s, %s' % (city, country)
|
self.location = u'%s, %s' % (city, country)
|
||||||
self.location_sort = u'%s, %s' % (country, city)
|
self.location_sort = u'%s, %s' % (country, city)
|
||||||
|
|
Loading…
Reference in a new issue