Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix rebase issues
Artur Smęt6fb421c747fe
diff --git a/saleor/graphql/api.py b/saleor/graphql/api.pyindex 5f8b98ffde..5500c56746 100644--- a/saleor/graphql/api.py+++ b/saleor/graphql/api.py@@ -53,7 +53,6 @@ from .shipping.types import ShippingZonefrom .shipping.mutations import (ShippingZoneCreate, ShippingZoneDelete, ShippingZoneUpdate,ShippingPriceCreate, ShippingPriceDelete, ShippingPriceUpdate)-from .utils import get_nodefrom .checkout.types import CheckoutLine, Checkoutfrom .checkout.mutations import (CheckoutCreate, CheckoutLinesAdd, CheckoutLinesUpdate, CheckoutLineDelete,@@ -154,7 +153,7 @@ class Query(ProductQueries):node = graphene.Node.Field()def resolve_checkout_line(self, info, id):- return get_node(info, id, only_type=CheckoutLine)+ return graphene.Node.get_node_from_global_id(info, id, CheckoutLine)def resolve_checkout_lines(self, info, query=None, **kwargs):return resolve_checkout_lines(info, query)diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.pyindex 5fc3d1b17a..377d3d3866 100644--- a/saleor/graphql/checkout/mutations.py+++ b/saleor/graphql/checkout/mutations.py@@ -14,7 +14,7 @@ from ..order.mutations.draft_orders import check_lines_quantityfrom ..order.types import Orderfrom ..product.types import ProductVariantfrom ..shipping.types import ShippingMethod-from ..utils import get_node, get_nodes+from ..utils import get_nodesfrom .types import Checkout, CheckoutLine@@ -92,7 +92,7 @@ class CheckoutLinesAdd(BaseMutation):@classmethoddef mutate(cls, root, info, checkout_id, lines, replace=False):- checkout = get_node(info, checkout_id, only_type=Checkout)+ checkout = graphene.Node.get_node_from_global_id(info, checkout_id, Checkout)variants, quantities = None, Noneerrors = []if lines:@@ -174,7 +174,8 @@ class CheckoutCustomerDetach(BaseMutation):@classmethoddef mutate(cls, root, info, checkout_id):- checkout = get_node(info, checkout_id, only_type=Checkout)+ checkout = graphene.Node.get_node_from_global_id(+ info, checkout_id, Checkout)if checkout:checkout.user = Nonecheckout.save(update_fields=['user'])diff --git a/saleor/graphql/payment/resolvers.py b/saleor/graphql/payment/resolvers.pyindex fb2396bd50..6e62b600b2 100644--- a/saleor/graphql/payment/resolvers.py+++ b/saleor/graphql/payment/resolvers.py@@ -2,8 +2,7 @@ from graphql_jwt.decorators import login_requiredfrom ...payment import modelsfrom ...payment.utils import gateway_get_client_token-from ..utils import filter_by_query_param, get_node-from .types import PaymentMethod+from ..utils import filter_by_query_paramPAYMENT_SEARCH_FIELDS = ['id']@@ -13,12 +12,5 @@ def resolve_payment_methods(info, query):queryset = filter_by_query_param(queryset, query, PAYMENT_SEARCH_FIELDS)return queryset--# @login_required-def resolve_payment_method(info, id):- payment = get_node(info, id, only_type=PaymentMethod)- return payment--def resolve_payment_client_token(gateway=None):return gateway_get_client_token(gateway)