Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wrong user id sent to event bus #213

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading