From 2abe2d6351e106694477894b6da67883e301e90d Mon Sep 17 00:00:00 2001 From: kdzch Date: Sun, 24 Sep 2017 20:13:20 -0500 Subject: [PATCH] Update serializers.py Error authentication with email --- rest_auth/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_auth/serializers.py b/rest_auth/serializers.py index ca34ccd..0efc8e2 100644 --- a/rest_auth/serializers.py +++ b/rest_auth/serializers.py @@ -71,7 +71,7 @@ class LoginSerializer(serializers.Serializer): user = self._validate_email(email, password) # Authentication through username - if app_settings.AUTHENTICATION_METHOD == app_settings.AuthenticationMethod.USERNAME: + elif app_settings.AUTHENTICATION_METHOD == app_settings.AuthenticationMethod.USERNAME: user = self._validate_username(username, password) # Authentication through either username or email