Merge pull request #171 from Akay7/CanLoginWithCustomUserModel

update for accept login users of CustomUserModel objects where doesn'…
This commit is contained in:
Maciej Jaworski 2016-02-23 10:24:36 +00:00
commit c282a1309e

View File

@ -81,7 +81,7 @@ class LoginSerializer(serializers.Serializer):
# Authentication without using allauth
if email:
try:
username = UserModel.objects.get(email__iexact=email).username
username = UserModel.objects.get(email__iexact=email).get_username()
except UserModel.DoesNotExist:
pass