Commit cf07a6eb authored by Caijun's avatar Caijun Committed by 老广

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

parent dd6c82b1
......@@ -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', '')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment