From 63eae6897c2c7da49c21f0678d5ecde9f9577660 Mon Sep 17 00:00:00 2001 From: Nathan Chapman Date: Sat, 14 May 2022 07:35:31 -0600 Subject: [PATCH] Fix coupon instance --- src/storefront/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storefront/views.py b/src/storefront/views.py index 56da62b..fda99d2 100644 --- a/src/storefront/views.py +++ b/src/storefront/views.py @@ -299,8 +299,8 @@ def paypal_order_transaction_capture(request, transaction_id): coupon = None if coupon: - form.instance.coupon = coupon - coupon.users.add(form.instance.customer) + order.coupon = coupon + coupon.users.add(order.customer) order.save() transaction = Transaction.objects.get(order=order) transaction.paypal_id = data['purchase_units'][0]['payments']['captures'][0]['id']