diff --git a/lms/djangoapps/mobile_api/users/views.py b/lms/djangoapps/mobile_api/users/views.py index f1b1acdd0998..d6d77dc1edf6 100644 --- a/lms/djangoapps/mobile_api/users/views.py +++ b/lms/djangoapps/mobile_api/users/views.py @@ -434,7 +434,10 @@ def get_primary_enrollment_by_latest_enrollment_or_progress(self) -> Optional[Co if not latest_progress: return latest_enrollment - enrollment_with_latest_progress = self.queryset.filter(course_id=latest_progress.course_id).first() + enrollment_with_latest_progress = self.queryset.filter( + course_id=latest_progress.course_id, + user__username=self.kwargs['username'], + ).first() if latest_enrollment.created > latest_progress.modified: return latest_enrollment