From 90b9b28c1691c1cf2beb371a803261df419168bd Mon Sep 17 00:00:00 2001 From: alexjmpb Date: Wed, 1 Nov 2023 11:17:28 -0500 Subject: [PATCH] feat: applying fixes to offer page --- ecommerce/extensions/api/v2/views/vouchers.py | 3 ++- ecommerce/static/templates/_offer_course_list.html | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ecommerce/extensions/api/v2/views/vouchers.py b/ecommerce/extensions/api/v2/views/vouchers.py index 2c1862112a5..c13afdd861e 100644 --- a/ecommerce/extensions/api/v2/views/vouchers.py +++ b/ecommerce/extensions/api/v2/views/vouchers.py @@ -338,7 +338,8 @@ def get_course_offer_data( elif 'card_image_url' in course_info: image = course_info['card_image_url'] else: - image = '' + # Get the course image from the LMS course API format. + image = course_info.get('media', {}).get('image', {}).get('raw', '') return { 'benefit': serializers.BenefitSerializer(benefit).data, 'contains_verified': is_verified, diff --git a/ecommerce/static/templates/_offer_course_list.html b/ecommerce/static/templates/_offer_course_list.html index 32971ad661b..9efdd36a974 100644 --- a/ecommerce/static/templates/_offer_course_list.html +++ b/ecommerce/static/templates/_offer_course_list.html @@ -31,10 +31,6 @@