Convert username to lower case
This commit is contained in:
parent
4ef256abb3
commit
d09f670a77
|
@ -54,7 +54,7 @@ class UserViewSet(viewsets.ReadOnlyModelViewSet):
|
|||
|
||||
@api_view(["POST"])
|
||||
def login(request):
|
||||
username = request.data.get("username")
|
||||
username = request.data.get("username").lower()
|
||||
password = request.data.get("password")
|
||||
if username is None or password is None:
|
||||
return Response({'error': 'Please provide both username and password'},
|
||||
|
|
Loading…
Reference in New Issue
Block a user