Commit 657249bd by Qubad786

Add broader exception.

parent 6be4337c
...@@ -226,16 +226,12 @@ class CourseOverview(TimeStampedModel): ...@@ -226,16 +226,12 @@ class CourseOverview(TimeStampedModel):
]) ])
CourseOverviewImageSet.create_or_update(course_overview, course) CourseOverviewImageSet.create_or_update(course_overview, course)
except IntegrityError: except Exception: # pylint: disable=broad-except
# There is a rare race condition that will occur if log.exception(
# CourseOverview.get_from_id is called while a "CourseOverview for course %s failed!",
# another identical overview is already in the process course_id,
# 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
return course_overview return course_overview
elif course is not None: elif course is not None:
raise IOError( raise IOError(
......
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