mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2025-06-06 22:13:04 +03:00
Merge pull request #386 from ducheneaut/patch-1
Prevent double-validation in LoginSerializer
This commit is contained in:
commit
ed16455712
|
@ -71,7 +71,7 @@ class LoginSerializer(serializers.Serializer):
|
||||||
user = self._validate_email(email, password)
|
user = self._validate_email(email, password)
|
||||||
|
|
||||||
# Authentication through username
|
# 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)
|
user = self._validate_username(username, password)
|
||||||
|
|
||||||
# Authentication through either username or email
|
# Authentication through either username or email
|
||||||
|
|
Loading…
Reference in New Issue
Block a user