Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Update code after code review
Mateusz Grzyb092919346595
diff --git a/saleor/graphql/payment/mutations.py b/saleor/graphql/payment/mutations.pyindex 5817379f24..98f017b91f 100644--- a/saleor/graphql/payment/mutations.py+++ b/saleor/graphql/payment/mutations.py@@ -256,8 +256,7 @@ class CheckoutPaymentCreate(BaseMutation, I18nMixin):customer_ip_address=get_client_ip(info.context),checkout=checkout,return_url=data.get("return_url"),- store_payment_method=data.get("store_payment_method")- or StorePaymentMethod.NONE,+ store_payment_method=data["store_payment_method"],metadata=metadata,)return CheckoutPaymentCreate(payment=payment, checkout=checkout)diff --git a/saleor/graphql/payment/tests/test_payment.py b/saleor/graphql/payment/tests/test_payment.pyindex ea5e3138f3..3d16ecf81f 100644--- a/saleor/graphql/payment/tests/test_payment.py+++ b/saleor/graphql/payment/tests/test_payment.py@@ -445,7 +445,6 @@ def test_create_payment_for_checkout_with_active_payments(@pytest.mark.parametrize("store",[- None,StorePaymentMethodEnum.NONE,StorePaymentMethodEnum.ON_SESSION,StorePaymentMethodEnum.OFF_SESSION,@@ -482,7 +481,7 @@ def test_create_payment_with_store(# thencheckout.refresh_from_db()payment = checkout.payments.first()- assert payment.store == (store or StorePaymentMethodEnum.NONE).lower()+ assert payment.store == store.lower()@pytest.mark.parametrize(