diff --git a/ecommerce/views/v0/__init__.py b/ecommerce/views/v0/__init__.py index 3892d56889..fb52016664 100644 --- a/ecommerce/views/v0/__init__.py +++ b/ecommerce/views/v0/__init__.py @@ -738,7 +738,10 @@ def _create_ga4_context(self, order): } if order.discounts.count() > 0: ga_purchase_payload["coupon"] = ",".join( - [discount.discount_code for discount in order.discounts] + [ + discount.redeemed_discount.discount_code + for discount in order.discounts.all() + ] ) return ga_purchase_payload