You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Course.MultipleObjectsReturned: get() returned more than one Course -- it returned 2!
(5 additional frame(s) were not displayed)
...
File "dashboard/api.py", line 274, in <listcomp>
run_statuses = [get_status_for_courserun(course_run, mmtrack)
File "dashboard/api.py", line 399, in get_status_for_courserun
if mmtrack.has_paid(course_run.edx_course_key):
File "dashboard/utils.py", line 222, in has_paid
course = Course.objects.get(courserun__edx_course_key=edx_course_key)
File "django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "django/db/models/query.py", line 410, in get
raise self.model.MultipleObjectsReturned(
An exception was intercepted by custom_exception_handler
The text was updated successfully, but these errors were encountered:
We started throwing this error suddenly on 7/8, probably due to data in production, and not due to a code change.
We often have to create course runs in the db before a course key is available. Queries on course runs shouldn't expect a unique course key.
We should add some tests that exercise this condition.
Sentry Issue: MICROMASTERS-582
The text was updated successfully, but these errors were encountered: