mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-12-04 14:53:43 +03:00
Merge pull request #5 from MathiasLantean/Fix_LoginSerializer
Fix if condition in LoginSerializer
This commit is contained in:
commit
6460348709
|
@ -100,7 +100,7 @@ class LoginSerializer(serializers.Serializer):
|
||||||
raise exceptions.ValidationError(msg)
|
raise exceptions.ValidationError(msg)
|
||||||
|
|
||||||
# If required, is the email verified?
|
# If required, is the email verified?
|
||||||
if 'rest_auth.registration' in settings.INSTALLED_APPS:
|
if 'dj_rest_auth.registration' in settings.INSTALLED_APPS:
|
||||||
from allauth.account import app_settings
|
from allauth.account import app_settings
|
||||||
if app_settings.EMAIL_VERIFICATION == app_settings.EmailVerificationMethod.MANDATORY:
|
if app_settings.EMAIL_VERIFICATION == app_settings.EmailVerificationMethod.MANDATORY:
|
||||||
email_address = user.emailaddress_set.get(email=user.email)
|
email_address = user.emailaddress_set.get(email=user.email)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user