Skip to content

Commit ed16455

Browse files
authored
Merge pull request #386 from ducheneaut/patch-1
Prevent double-validation in LoginSerializer
2 parents 658664a + 8bd8d60 commit ed16455

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_auth/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def validate(self, attrs):
7171
user = self._validate_email(email, password)
7272

7373
# Authentication through username
74-
if app_settings.AUTHENTICATION_METHOD == app_settings.AuthenticationMethod.USERNAME:
74+
elif app_settings.AUTHENTICATION_METHOD == app_settings.AuthenticationMethod.USERNAME:
7575
user = self._validate_username(username, password)
7676

7777
# Authentication through either username or email

0 commit comments

Comments
 (0)