Fix unicode coercion in UserProfile (bug 734927)
This commit is contained in:
Родитель
f3b3e029bc
Коммит
62b9717ee9
|
@ -380,7 +380,7 @@ def change_addon(request, collection, action):
|
||||||
return http.HttpResponseBadRequest()
|
return http.HttpResponseBadRequest()
|
||||||
|
|
||||||
getattr(collection, action + '_addon')(addon)
|
getattr(collection, action + '_addon')(addon)
|
||||||
log.info(u'%r: %s %s to collection %s' %
|
log.info(u'%s: %s %s to collection %s' %
|
||||||
(request.amo_user, action, addon.id, collection.id))
|
(request.amo_user, action, addon.id, collection.id))
|
||||||
|
|
||||||
if request.is_ajax():
|
if request.is_ajax():
|
||||||
|
|
|
@ -147,7 +147,7 @@ class UserProfile(amo.models.OnChangeMixin, amo.models.ModelBase):
|
||||||
self.username = smart_unicode(self.username)
|
self.username = smart_unicode(self.username)
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return '%s: %s' % (self.id, self.display_name or self.username)
|
return u'%s: %s' % (self.id, self.display_name or self.username)
|
||||||
|
|
||||||
def get_url_path(self):
|
def get_url_path(self):
|
||||||
return reverse('users.profile', args=[self.id])
|
return reverse('users.profile', args=[self.id])
|
||||||
|
|
Загрузка…
Ссылка в новой задаче