File tree 1 file changed +3
-2
lines changed
{{cookiecutter.project_slug}}/home/api/v1 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 3
3
from django .utils .translation import gettext_lazy as _
4
4
from allauth .account import app_settings as allauth_settings
5
5
from allauth .account .forms import ResetPasswordForm
6
- from allauth .utils import email_address_exists , generate_unique_username
6
+ from allauth .utils import generate_unique_username
7
+ from allauth .account .utils import assess_unique_email
7
8
from allauth .account .adapter import get_adapter
8
9
from allauth .account .utils import setup_user_email
9
10
from rest_framework import serializers
@@ -38,7 +39,7 @@ def _get_request(self):
38
39
def validate_email (self , email ):
39
40
email = get_adapter ().clean_email (email )
40
41
if allauth_settings .UNIQUE_EMAIL :
41
- if email and email_address_exists (email ):
42
+ if email and assess_unique_email (email ):
42
43
raise serializers .ValidationError (
43
44
_ ("A user is already registered with this e-mail address." )
44
45
)
You can’t perform that action at this time.
0 commit comments