Unverified Commit d48a1d5f by Michael Frey Committed by GitHub

Merge pull request #16926 from edx/mjfrey/LEARNER-3606

Get only the first program from the list of matching entitlements.
parents 79d95e9c 3305a7c3
......@@ -222,10 +222,8 @@ class ProgramProgressMeter(object):
completed, in_progress, not_started = [], [], []
for course in program_copy['courses']:
try:
entitlement = CourseEntitlement.objects.get(user=self.user, course_uuid=course['uuid'])
except CourseEntitlement.DoesNotExist:
entitlement = None
entitlement = CourseEntitlement.objects.filter(user=self.user,
course_uuid=course['uuid']).first()
if self._is_course_complete(course):
completed.append(course)
......
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