1919}
2020
2121
22- def backfill_openedx_catalog (apps , schema_editor ):
22+ def backfill_openedx_catalog (apps , schema_editor ) -> None :
2323 """
2424 Populate the new CourseRun and CatalogCourse models.
2525 """
@@ -63,7 +63,7 @@ def backfill_openedx_catalog(apps, schema_editor):
6363 course_overview = CourseOverview .objects .get (id = course_idx .course_id )
6464 except CourseOverview .DoesNotExist :
6565 course_overview = None # Course exists in modulestore but details aren't cached into CourseOverview yet
66- display_name : str = (course_overview .display_name if course_overview else None ) or course_code
66+ title : str = (course_overview .display_name if course_overview else None ) or course_code
6767
6868 # Determine the course language.
6969 # Note that in Studio, the options for course language generally came from the ALL_LANGUAGES setting, which is
@@ -93,9 +93,9 @@ def backfill_openedx_catalog(apps, schema_editor):
9393 org_id = org_data ["id" ],
9494 course_code = course_code ,
9595 defaults = {
96- # The default display_name for the catalog course will be the same name as the newest run, since we
97- # iterate over "all_course_runs" in "-pk" order (should be same as reverse chronological)
98- "display_name " : display_name ,
96+ # The default title for the catalog course will be the same name as the newest run, since we iterate
97+ # over "all_course_runs" in "-pk" order (should be same as reverse chronological)
98+ "title " : title ,
9999 "language" : language ,
100100 },
101101 )
@@ -114,7 +114,7 @@ def backfill_openedx_catalog(apps, schema_editor):
114114 catalog_course = cc ,
115115 run_code = run_code ,
116116 course_key = course_idx .course_id ,
117- defaults = {"display_name " : display_name },
117+ defaults = {"title " : title },
118118 )
119119
120120 # Correct the "created" timestamp. Since it has auto_now_add=True, we can't set its value except using update()
0 commit comments