Commit 7f942bfc by Calen Pennington

Revert "Merge pull request #14177 from edx/naa/fix-marketing-pr"

This reverts commit dec4034b, reversing
changes made to ef55cc4f.
parent 07865ce0
......@@ -272,15 +272,13 @@ class UserCourseEnrollmentsList(APIView):
Returns a list of courses enrolled by user.
"""
queryset = CourseEnrollment.objects.all()
enrollments = list(
queryset.filter(
user__username=username,
is_active=True
).order_by('created').reverse()
)
course_ids = [enrollment.course_id for enrollment in enrollments]
course_ids = set(queryset.values_list('course_id', flat=True))
catalog_course_runs_against_course_keys = get_course_runs(course_ids, request.user)
enrollments = queryset.filter(
user__username=username,
is_active=True
).order_by('created').reverse()
org = request.query_params.get('org', None)
return Response([
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment