From cf07a6ebb709860eb30ee388697069eed7a8f85b Mon Sep 17 00:00:00 2001 From: Caijun Date: Fri, 2 Jun 2017 17:15:59 +0800 Subject: [PATCH] Fix judging request.user valid on UserToken API (#476) --- apps/users/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/users/api.py b/apps/users/api.py index 895cba9fa..56f6d52c2 100644 --- a/apps/users/api.py +++ b/apps/users/api.py @@ -85,7 +85,7 @@ class UserToken(APIView): permission_classes = (AllowAny,) def post(self, request): - if not request.user: + if not request.user.is_authenticated: username = request.data.get('username', '') email = request.data.get('email', '') password = request.data.get('password', '')