Skip to content

Commit

Permalink
Fixed a unicode error in caching user info for Trac.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobian committed Sep 12, 2011
1 parent e2b3912 commit b0b0244
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions django_website/accounts/views.py
Expand Up @@ -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:
Expand Down

0 comments on commit b0b0244

Please sign in to comment.