Skip to content

Commit

Permalink
fix: fixed getting a users' name on UserData collections
Browse files Browse the repository at this point in the history
  • Loading branch information
NiedielnitsevIvan committed Jan 14, 2025
1 parent 81f825f commit c05cd1e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lms/djangoapps/grades/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def _emit_course_passing_status_update(user, course_id, is_passing):
pii=UserPersonalData(
username=user.username,
email=user.email,
name=user.get_full_name(),
name=user.get_full_name() or user.profile.name,
),
id=user.id,
is_active=user.is_active,
Expand All @@ -305,7 +305,7 @@ def _emit_course_passing_status_update(user, course_id, is_passing):
pii=UserPersonalData(
username=user.username,
email=user.email,
name=user.get_full_name(),
name=user.get_full_name() or user.profile.name,
),
id=user.id,
is_active=user.is_active,
Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/grades/tests/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def test_course_passing_status_updated_emitted(self):
pii=UserPersonalData(
username=self.user.username,
email=self.user.email,
name=self.user.get_full_name(),
name=self.user.get_full_name() or self.user.profile.name,
),
id=self.user.id,
is_active=self.user.is_active,
Expand Down Expand Up @@ -234,7 +234,7 @@ def test_ccx_course_passing_status_updated_emitted(self):
pii=UserPersonalData(
username=self.user.username,
email=self.user.email,
name=self.user.get_full_name(),
name=self.user.get_full_name() or self.user.profile.name,
),
id=self.user.id,
is_active=self.user.is_active,
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/verify_student/signals/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _create_user_data(user):
pii=UserPersonalData(
username=user.username,
email=user.email,
name=user.get_full_name()
name=user.get_full_name() or user.profile.name
)
)

Expand Down

0 comments on commit c05cd1e

Please sign in to comment.