Skip to content

Commit 1a964f9

Browse files
committed
Merge pull request #4 from Akay7/CanLoginWithCustomUserModel
update for accept login users of CustomUserModel objects where doesn'…
2 parents 2acf4dd + cc9552a commit 1a964f9

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
@@ -81,7 +81,7 @@ def validate(self, attrs):
8181
# Authentication without using allauth
8282
if email:
8383
try:
84-
username = UserModel.objects.get(email__iexact=email).username
84+
username = UserModel.objects.get(email__iexact=email).get_username()
8585
except UserModel.DoesNotExist:
8686
pass
8787

0 commit comments

Comments
 (0)