Fix some unicode related issues in oauth and the api.
Found using the previous commit.
This commit is contained in:
parent
601e6e0cce
commit
1eac751bd2
@ -41,7 +41,7 @@ class HTTPAuth(Auth):
|
||||
return False
|
||||
|
||||
user = request.db.User.query.filter_by(
|
||||
username=request.authorization['username']).first()
|
||||
username=unicode(request.authorization['username'])).first()
|
||||
|
||||
if user.check_login(request.authorization['password']):
|
||||
request.user = user
|
||||
|
@ -101,4 +101,4 @@ class TestAPI(object):
|
||||
|
||||
assert response.status_int == 200
|
||||
|
||||
assert self.db.MediaEntry.query.filter_by(title='Great JPG!').first()
|
||||
assert self.db.MediaEntry.query.filter_by(title=u'Great JPG!').first()
|
||||
|
Loading…
x
Reference in New Issue
Block a user