From b250f4a07ad60aa13c97711d70451efa075c5531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Rychlik?= Date: Tue, 17 Jun 2014 17:09:13 +0200 Subject: [PATCH] Hotfixed user query in _check_token_data, 0.1.12 Need to add tests now :D --- jsonis/jwt/views.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jsonis/jwt/views.py b/jsonis/jwt/views.py index 78389ea..d2bb77e 100644 --- a/jsonis/jwt/views.py +++ b/jsonis/jwt/views.py @@ -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: diff --git a/setup.py b/setup.py index 131fb84..b003945 100644 --- a/setup.py +++ b/setup.py @@ -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='rychlis@rychlis.cz',