From 2fd3592586ff2f54ca17c31c4b25b0b5be79c2fe Mon Sep 17 00:00:00 2001 From: Jillian Vogel Date: Fri, 27 Jul 2018 09:26:20 +0930 Subject: [PATCH] Do not delete course enrollments when the associated CourseOverview gets recreated. --- common/djangoapps/student/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index 8a689bb41f..5b325b7514 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -1162,7 +1162,7 @@ class CourseEnrollment(models.Model): course = models.ForeignKey( CourseOverview, db_constraint=False, - on_delete=models.CASCADE, + on_delete=models.DO_NOTHING, ) @property