Merge pull request #8224 from Stanford-Online/kluo/course-creation-after-deletion

Allow course creation after deletion at same URL
This commit is contained in:
Ali Mohammad
2015-06-16 11:24:50 -04:00
2 changed files with 12 additions and 1 deletions

View File

@@ -586,7 +586,7 @@ class MixedModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase):
"""
# first make sure an existing course doesn't already exist in the mapping
course_key = self.make_course_key(org, course, run)
if course_key in self.mappings:
if course_key in self.mappings and self.mappings[course_key].has_course(course_key):
raise DuplicateCourseError(course_key, course_key)
# create the course