fix: remove the created flag for user profile creation (#28645)

This commit is contained in:
Usama Sadiq
2021-09-03 16:29:00 +05:00
committed by GitHub
parent cb93219c23
commit d075fc8033

View File

@@ -837,7 +837,7 @@ def user_post_save_callback(sender, **kwargs):
# Ensure the user has a profile when run via management command
_called_by_management_command = getattr(user, '_called_by_management_command', None)
if _called_by_management_command and kwargs['created']:
if _called_by_management_command:
try:
__ = user.profile
except UserProfile.DoesNotExist: