diff --git a/course_discovery/apps/course_metadata/management/commands/populate_product_catalog.py b/course_discovery/apps/course_metadata/management/commands/populate_product_catalog.py index a020452a55..8bbc6b8fe9 100644 --- a/course_discovery/apps/course_metadata/management/commands/populate_product_catalog.py +++ b/course_discovery/apps/course_metadata/management/commands/populate_product_catalog.py @@ -23,7 +23,7 @@ class Command(BaseCommand): CATALOG_CSV_HEADERS = [ 'UUID', 'Title', 'Organizations Name', 'Organizations Logo', 'Organizations Abbr', 'Languages', - 'Subjects', 'Subjects Spanish', 'Marketing URL', 'Marketing Image' + 'Subjects', 'Subjects Spanish', 'Marketing URL', 'Marketing Image', 'Short Description', 'Full Description' ] def add_arguments(self, parser): @@ -162,6 +162,8 @@ def get_transformed_data(self, product, product_type): ), "Languages": product.languages_codes(), "Marketing Image": product.image.url if product.image else "", + "Short Description": product.short_description, + "Full Description": product.full_description, }) elif product_type == 'degree': data.update({ @@ -172,6 +174,8 @@ def get_transformed_data(self, product, product_type): ), "Languages": ", ".join(language.code for language in product.active_languages) or 'en-us', "Marketing Image": product.card_image.url if product.card_image else "", + "Short Description": product.subtitle, + "Full Description": product.overview, }) return data diff --git a/course_discovery/apps/course_metadata/management/commands/tests/test_populate_product_catalog.py b/course_discovery/apps/course_metadata/management/commands/tests/test_populate_product_catalog.py index d160c57271..75a271b160 100644 --- a/course_discovery/apps/course_metadata/management/commands/tests/test_populate_product_catalog.py +++ b/course_discovery/apps/course_metadata/management/commands/tests/test_populate_product_catalog.py @@ -505,6 +505,8 @@ def test_get_transformed_data(self): ), "Marketing URL": product.marketing_url, "Marketing Image": (product.image.url if product.image else ""), + "Short Description": product.short_description, + "Full Description": product.full_description, } def test_get_transformed_data_for_degree(self): @@ -538,6 +540,8 @@ def test_get_transformed_data_for_degree(self): ), "Marketing URL": product.marketing_url, "Marketing Image": product.card_image.url if product.card_image else "", + "Short Description": product.subtitle, + "Full Description": product.overview, } @mock.patch('course_discovery.apps.course_metadata.management.commands.populate_product_catalog.GspreadClient')