From d075fc80335a909c071fdda03a80b2a38150e701 Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Fri, 3 Sep 2021 16:29:00 +0500 Subject: [PATCH] fix: remove the created flag for user profile creation (#28645) --- common/djangoapps/student/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index 714efa9060..30a39091fc 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -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: