Skip to content

Commit

Permalink
fix: wrong user id sent to event bus (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharis278 authored Nov 15, 2023
1 parent c0d5c97 commit 707e5be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion edx_exams/apps/core/signals/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def _create_user_data(user):
Helper function to create a UserData object.
"""
user_data = UserData(
id=user.id,
id=user.lms_user_id,
is_active=user.is_active,
pii=UserPersonalData(
username=user.username,
Expand Down
6 changes: 3 additions & 3 deletions edx_exams/apps/core/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def test_attempt_event_emitted(self, event_name, status, expect_requesting_user)
self.assertEqual(mock_event_send.call_count, 1)

user_data = UserData(
id=self.user.id,
id=self.user.lms_user_id,
is_active=self.user.is_active,
pii=UserPersonalData(
username=self.user.username,
Expand Down Expand Up @@ -650,7 +650,7 @@ def test_event_emitted(self, mock_event_send):
reset_exam_attempt(self.exam_attempt, self.user)

user_data = UserData(
id=self.student_user.id,
id=self.student_user.lms_user_id,
is_active=self.student_user.is_active,
pii=UserPersonalData(
username=self.student_user.username,
Expand All @@ -659,7 +659,7 @@ def test_event_emitted(self, mock_event_send):
)
)
requesting_user_data = UserData(
id=self.user.id,
id=self.user.lms_user_id,
is_active=self.user.is_active,
pii=UserPersonalData(
username=self.user.username,
Expand Down

0 comments on commit 707e5be

Please sign in to comment.