Commit 9db1b9cc by Qubad786

address feedback

parent 657249bd
......@@ -226,11 +226,22 @@ class CourseOverview(TimeStampedModel):
])
CourseOverviewImageSet.create_or_update(course_overview, course)
except IntegrityError:
# There is a rare race condition that will occur if
# CourseOverview.get_from_id is called while a
# another identical overview is already in the process
# of being created.
# One of the overviews will be saved normally, while the
# other one will cause an IntegrityError because it tries
# to save a duplicate.
# (see: https://openedx.atlassian.net/browse/TNL-2854).
pass
except Exception: # pylint: disable=broad-except
log.exception(
"CourseOverview for course %s failed!",
course_id,
)
raise
return course_overview
elif course is not None:
......
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