Permalink
Browse files

Fixed a unicode error in caching user info for Trac.

  • Loading branch information...
1 parent e2b3912 commit b0b024430be5fb17d69107d8574b2a817fe250af @jacobian jacobian committed Sep 12, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 django_website/accounts/views.py
View
1 django_website/accounts/views.py
@@ -41,6 +41,7 @@ def json_user_info(request):
def get_user_info(username):
c = cache.get_cache('default')
+ username = username.encode('ascii', 'ignore')
key = 'trac_user_info:%s' % hashlib.md5(username).hexdigest()
info = c.get(key)
if info is None:

0 comments on commit b0b0244

Please sign in to comment.