Slight refactoring of fix

This commit is contained in:
Christian Jauvin 2023-10-30 17:12:13 -04:00
parent 83bc576271
commit 9e91cec7f8

View File

@ -27,8 +27,7 @@ class SocialAccountAdapter(DefaultSocialAccountAdapter):
See: https://django-allauth.readthedocs.io/en/latest/advanced.html?#creating-and-populating-user-instances
"""
super().populate_user(request, sociallogin, data)
user = sociallogin.user
user = super().populate_user(request, sociallogin, data)
if not user.name:
if name := data.get("name"):
user.name = name