Fix judging request.user valid on UserToken API (#476)

pull/480/head
Caijun 2017-06-02 17:15:59 +08:00 committed by 老广
parent dd6c82b168
commit cf07a6ebb7
1 changed files with 1 additions and 1 deletions

View File

@ -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', '')