Commit 2585c0b2 authored by lizonr1's avatar lizonr1

email is not case sensitive

parent d3c3d737
......@@ -18,8 +18,7 @@ class AuthTokenSerializerByEmail(serializers.Serializer):
email = attrs.get('email')
password = attrs.get('password')
queryset = User.objects.all()
user_by_email = get_object_or_404(queryset, email=email)
user_by_email = get_object_or_404(queryset, email__iexact=email)
if user_by_email and password:
user = authenticate(username=user_by_email.username, password=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