Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add info to changelog

Damian W23a4635cebab
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 973d74e93a..a355393b73 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -106,6 +106,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Refactor `OrderCancel` mutation for multiple warehouses - #5554 by @fowczarek
- Add negative weight validation - #5564 by @fowczarek
- Add error when user pass empty object as address - #5585 by @fowczarek
+- Fix payment creation without shipping method - #5444 by @d-wysocki
## 2.9.0
diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.py
index 73af2d7013..b1d94dbe10 100644
--- a/saleor/graphql/checkout/mutations.py
+++ b/saleor/graphql/checkout/mutations.py
@@ -735,9 +735,8 @@ class CheckoutComplete(BaseMutation):
discounts = info.context.discounts
user = info.context.user
- clean_args = checkout, list(checkout), discounts, CheckoutErrorCode
- clean_checkout_shipping(*clean_args)
- clean_checkout_payment(*clean_args)
+ clean_checkout_shipping(checkout, lines, discounts, CheckoutErrorCode)
+ clean_checkout_payment(checkout, lines, discounts, CheckoutErrorCode)
payment = checkout.get_last_active_payment()
diff --git a/tests/api/test_checkout.py b/tests/api/test_checkout.py
index e774b53b8e..4b4d2a9483 100644
--- a/tests/api/test_checkout.py
+++ b/tests/api/test_checkout.py
@@ -2217,9 +2217,9 @@ def test_clean_checkout(checkout_with_item, payment_dummy, address, shipping_met
payment.checkout = checkout
payment.save()
# Shouldn't raise any errors
- clean_args = (checkout, list(checkout), None, CheckoutErrorCode)
- clean_checkout_shipping(*clean_args)
- clean_checkout_payment(*clean_args)
+ lines = list(checkout)
+ clean_checkout_shipping(checkout, lines, None, CheckoutErrorCode)
+ clean_checkout_payment(checkout, lines, None, CheckoutErrorCode)
def test_clean_checkout_no_shipping_method(checkout_with_item, address):