Stringify keys in backfill_orgs_and_org_courses (#25802)
The command was failing when it encountered both Old Mongo and Split Mongo course keys, as it tried to `sort` the keys, but Opaque Keys are only comparable if they are of the same type. The solution is to convert them to strings before sorting. The edx-organizations code that instruments the backfill knows to parse them back into CourseKeys.
Showing
- cms/djangoapps/contentstore/management/commands/backfill_orgs_and_org_courses.py 21 additions, 21 deletions...tore/management/commands/backfill_orgs_and_org_courses.py
- cms/djangoapps/contentstore/management/commands/tests/test_backfill_orgs_and_org_courses.py 11 additions, 2 deletions...ment/commands/tests/test_backfill_orgs_and_org_courses.py
Please register or sign in to comment