diff --git a/cms/djangoapps/contentstore/tests/test_course_create_rerun.py b/cms/djangoapps/contentstore/tests/test_course_create_rerun.py index d9023bfce224..a03e8e9cd2f5 100644 --- a/cms/djangoapps/contentstore/tests/test_course_create_rerun.py +++ b/cms/djangoapps/contentstore/tests/test_course_create_rerun.py @@ -104,10 +104,9 @@ def test_rerun(self): dest_course_key = CourseKey.from_string(data['destination_course_key']) self.assertEqual(dest_course_key.run, 'copy') - source_course = self.store.get_course(self.source_course_key) dest_course = self.store.get_course(dest_course_key) self.assertEqual(dest_course.start, CourseFields.start.default) - self.assertEqual(dest_course.end, source_course.end) + self.assertEqual(dest_course.end, None) self.assertEqual(dest_course.enrollment_start, None) self.assertEqual(dest_course.enrollment_end, None) course_orgs = get_course_organizations(dest_course_key) diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index dce82809dfad..9f6cfb7c430e 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -878,6 +878,7 @@ def _create_or_rerun_course(request): display_name = request.json.get('display_name') # force the start date for reruns and allow us to override start via the client start = request.json.get('start', CourseFields.start.default) + end = request.json.get('end', CourseFields.end.default) run = request.json.get('run') has_course_creator_role = is_content_creator(request.user, org) @@ -892,7 +893,7 @@ def _create_or_rerun_course(request): status=400 ) - fields = {'start': start} + fields = {'start': start, 'end': end} if display_name is not None: fields['display_name'] = display_name