Skip to content
Snippets Groups Projects
Commit 2abfc665 authored by Calen Pennington's avatar Calen Pennington
Browse files

Rather than deleting CourseOverviews to update their version numbers, just...

Rather than deleting CourseOverviews to update their version numbers, just reload them from the modulestore
parent 6dbc0e77
No related merge requests found
......@@ -321,9 +321,8 @@ class CourseOverview(TimeStampedModel):
try:
course_overview = cls.objects.select_related('image_set').get(id=course_id)
if course_overview.version < cls.VERSION:
# Throw away old versions of CourseOverview, as they might contain stale data.
course_overview.delete()
course_overview = None
# Reload the overview from the modulestore to update the version
course_overview = cls.load_from_module_store(course_id)
except cls.DoesNotExist:
course_overview = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment