diff --git a/make_post_sell/views/cart.py b/make_post_sell/views/cart.py index 99115ca..8aea20a 100644 --- a/make_post_sell/views/cart.py +++ b/make_post_sell/views/cart.py @@ -1091,7 +1091,13 @@ def paypal_complete_checkout(request): for invoice in successful_invoices: for line_item in invoice.line_items: - cart.remove_product(line_item.product, line_item.quantity) + # remove_product takes (product,) — drops the cart + # entry entirely regardless of quantity. A previous + # pair passed quantity as a second arg and was + # raising TypeError "takes 2 positional arguments + # but 3 were given" — which silently 502'd via the + # pyramid_tm tm.abort path until tm.doom landed. + cart.remove_product(line_item.product) cart.update_inventory(request.shop_location) for invoice in successful_invoices: @@ -1342,7 +1348,13 @@ def adyen_complete_checkout(request): for invoice in successful_invoices: for line_item in invoice.line_items: - cart.remove_product(line_item.product, line_item.quantity) + # remove_product takes (product,) — drops the cart + # entry entirely regardless of quantity. A previous + # pair passed quantity as a second arg and was + # raising TypeError "takes 2 positional arguments + # but 3 were given" — which silently 502'd via the + # pyramid_tm tm.abort path until tm.doom landed. + cart.remove_product(line_item.product) cart.update_inventory(request.shop_location) for invoice in successful_invoices: