version 0.0.5.8: fixed endpoint to login via email
This commit is contained in:
parent
7c27757874
commit
d6db4a2e43
|
|
@ -88,7 +88,7 @@ class LoginByEmailSerializer(LoginSerializerMixin, serializers.ModelSerializer):
|
||||||
"""Override validate method"""
|
"""Override validate method"""
|
||||||
try:
|
try:
|
||||||
user = account_models.User.objects.get(email=attrs.get('email'))
|
user = account_models.User.objects.get(email=attrs.get('email'))
|
||||||
attrs['username'] = user.get_username
|
attrs['username'] = user.get_username()
|
||||||
except account_models.User.DoesNotExist:
|
except account_models.User.DoesNotExist:
|
||||||
raise utils_exceptions.UserNotFoundError()
|
raise utils_exceptions.UserNotFoundError()
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ from authorization.views import common as views
|
||||||
extra = getattr(settings, setting_name('TRAILING_SLASH'), True) and '/' or ''
|
extra = getattr(settings, setting_name('TRAILING_SLASH'), True) and '/' or ''
|
||||||
|
|
||||||
|
|
||||||
app_name = 'social'
|
app_name = 'oauth2'
|
||||||
|
|
||||||
urlpatterns_social_django = [
|
urlpatterns_social_django = [
|
||||||
# authentication / association
|
# authentication / association
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user