diff --git a/pandora/user/models.py b/pandora/user/models.py index 5ce7000e..1d86b808 100644 --- a/pandora/user/models.py +++ b/pandora/user/models.py @@ -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)