openedx / course-discovery

Service providing access to consolidated course and program metadata
https://edx-discovery.readthedocs.io/en/latest/
GNU Affero General Public License v3.0
57 stars 171 forks source link

fix: use correct course_key in case of a key_for_rerun in RCM #4411

Closed Ali-D-Akbar closed 1 month ago

Ali-D-Akbar commented 1 month ago

PROD-4133

Updates the logic behind bringing the courses from studio in case a course is created in Studio and not in Discovery. Previous logic used to create a course_run from Studio into Discovery with whatever was present in the key. In case a course has a value in key_for_reruns, it used to assign those course_runs to the key equal to key_for_reruns.

Now, it finds if a course has a key_for_reruns, it will assign this course_run to the correct course that has the custom key_for_reruns value.