This commit is contained in:
Olivier Dalang 2022-04-03 16:06:30 +09:00 committed by GitHub
commit 927c6ef709
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,7 +129,7 @@ class SocialLoginSerializer(serializers.Serializer):
# with the same email address: raise an exception.
# This needs to be handled in the frontend. We can not just
# link up the accounts due to security constraints
if allauth_settings.UNIQUE_EMAIL:
if login.user.email and allauth_settings.UNIQUE_EMAIL:
# Do we have an account already with this email address?
account_exists = get_user_model().objects.filter(
email=login.user.email,