From 62b9717ee996284c7915214c42a5df3743bcafe3 Mon Sep 17 00:00:00 2001 From: Kumar McMillan Date: Mon, 12 Mar 2012 13:16:16 -0500 Subject: [PATCH] Fix unicode coercion in UserProfile (bug 734927) --- apps/bandwagon/views.py | 2 +- apps/users/models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/bandwagon/views.py b/apps/bandwagon/views.py index 677cec61c0..bb1ea4b0be 100644 --- a/apps/bandwagon/views.py +++ b/apps/bandwagon/views.py @@ -380,7 +380,7 @@ def change_addon(request, collection, action): return http.HttpResponseBadRequest() 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)) if request.is_ajax(): diff --git a/apps/users/models.py b/apps/users/models.py index b26a4e1b3e..4c07f9c11b 100644 --- a/apps/users/models.py +++ b/apps/users/models.py @@ -147,7 +147,7 @@ class UserProfile(amo.models.OnChangeMixin, amo.models.ModelBase): self.username = smart_unicode(self.username) 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): return reverse('users.profile', args=[self.id])