fix!: split modulestore's has_course(ignore_case=True) was not working (#38044)

BREAKING CHANGE: this forces course IDs in modulestore to be unique (case insensitive). This was always supposed to be the case, but it wasn't working properly on MySQL. Upgrading past this commit may cause a migration failure if you have conflicting course IDs - see the migration 0004 docstring for details.
This commit is contained in:
Braden MacDonald
2026-02-19 15:12:41 -08:00
committed by Braden MacDonald
parent 3e522d5272
commit 12e9af4f5c
5 changed files with 117 additions and 12 deletions

View File

@@ -1275,6 +1275,7 @@ class ContentStoreTest(ContentStoreTestCase):
resp = self.client.ajax_post('/course/', self.course_data)
self.assertEqual(resp.status_code, 200)
data = parse_json(resp)
assert 'ErrMsg' in data, "Expected the course creation to fail"
self.assertRegex(data['ErrMsg'], error_message)
if test_enrollment:
# One test case involves trying to create the same course twice. Hence for that course,