Commit 3305a7c3 by Michael Frey

Get only the first program from the list of matching entitlements.

LEARNER-3606
parent d2b14f15
......@@ -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