Merge pull request #386 from ducheneaut/patch-1

Prevent double-validation in LoginSerializer
This commit is contained in:
mario 2017-11-27 08:15:33 +01:00 committed by GitHub
commit ed16455712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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