Convert username to lower case

This commit is contained in:
Tanner Collin 2018-11-18 02:31:37 -07:00
parent 4ef256abb3
commit d09f670a77

View File

@ -54,7 +54,7 @@ class UserViewSet(viewsets.ReadOnlyModelViewSet):
@api_view(["POST"]) @api_view(["POST"])
def login(request): def login(request):
username = request.data.get("username") username = request.data.get("username").lower()
password = request.data.get("password") password = request.data.get("password")
if username is None or password is None: if username is None or password is None:
return Response({'error': 'Please provide both username and password'}, return Response({'error': 'Please provide both username and password'},