Moderation view assumes ascii codec for LP user names

Bug #741909 reported by Michael Nelson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ratings and Reviews server
Fix Released
High
Danny Tamez

Bug Description

Steps to reproduce:

1) Ensure review is flagged by someone with a non-ascii chars in their name (or the review is written by such a person),
2) As a moderator, access the moderations view, eg: https://reviews.staging.ubuntu.com/reviews/moderations/

The moderation view is currently failing on staging for this reason with:
File "/usr/lib/python2.6/dist-packages/reviewsapp/templatetags/reviewsapp.py", line 53, in lp_user
    escape(user.username), escape(name))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128)

Related branches

description: updated
Changed in rnr-server:
importance: Undecided → High
Danny Tamez (zematynnad)
Changed in rnr-server:
assignee: nobody → Danny Tamez (zematynnad)
status: New → In Progress
Revision history for this message
Michael Nelson (michael.nelson) wrote :

I QA'd this on the daily server by first (before deploying the fix):

 1) Updated my own user's first name to include unicode chars: http://pastebin.ubuntu.com/585246/ (I can't update my own record via the admin as Django doesn't like my username)
 2) Verified that the view http://184.82.116.62/reviews/moderations/ breaks as on staging
 3) Deployed again to the daily server (with danny's fix)
 4) Verified that the view http://184.82.116.62/reviews/moderations/ now displays my unicode name (as shown in attached image).

Danny Tamez (zematynnad)
Changed in rnr-server:
status: In Progress → Fix Committed
Changed in rnr-server:
milestone: none → 11.03
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.