decode user uniq to utf-8
authorSofia Papagiannaki <papagian@gmail.com>
Thu, 5 Jan 2012 15:06:21 +0000 (17:06 +0200)
committerSofia Papagiannaki <papagian@gmail.com>
Thu, 5 Jan 2012 15:06:21 +0000 (17:06 +0200)
pithos/middleware/user.py

index c932e9c..99d03a4 100644 (file)
@@ -68,7 +68,7 @@ def get_user_from_token(token):
     users = settings.AUTHENTICATION_USERS
     if users is not None:
         try:
-            return {'id': 0, 'uniq': users[token]}
+            return {'id': 0, 'uniq': users[token].decode('utf8')}
         except:
             return None