diff --git a/django_etebase/views.py b/django_etebase/views.py index 971d0fe..0ba3b44 100644 --- a/django_etebase/views.py +++ b/django_etebase/views.py @@ -654,7 +654,7 @@ class AuthenticationViewSet(viewsets.ViewSet): return Response(data, status=status.HTTP_201_CREATED) def get_login_user(self, username): - kwargs = {User.USERNAME_FIELD: username.lower()} + kwargs = {User.USERNAME_FIELD + '__iexact': username.lower()} try: user = self.get_queryset().get(**kwargs) if not hasattr(user, 'userinfo'):