Skip to content

Commit

Permalink
Hotfixed user query in _check_token_data, 0.1.12
Browse files Browse the repository at this point in the history
Need to add tests now :D
  • Loading branch information
Tomáš Rychlik committed Jun 17, 2014
1 parent 916779a commit b250f4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jsonis/jwt/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def dispatch(self, request, *args, **kwargs):
def _check_token_data(self, jwt_token_data):
"""Parsed token data checks. Returns a Response if there is an error, None otherwise"""
try:
self.user = get_user_model().objects.get(pk=self.jwt_token_data['id'])
self.user = get_user_model().objects.get(pk=jwt_token_data['id'])
except (TypeError, KeyError):
return self.render_api_error_response('Not authenticated - Bad authorization header data', status=401)
except get_user_model().DoesNotExist:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='django-jsonis',
version='0.1.11',
version='0.1.12',
description='Django JSON Utils',
author='Tomas Rychlik',
author_email='[email protected]',
Expand Down

0 comments on commit b250f4a

Please sign in to comment.