Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Drop shipping method from OrderUpdateShipping
Pacu23f81cb0a1fa1
diff --git a/saleor/graphql/order/mutations/orders.py b/saleor/graphql/order/mutations/orders.pyindex 19147d778c..2e04f5b6f4 100644--- a/saleor/graphql/order/mutations/orders.py+++ b/saleor/graphql/order/mutations/orders.py@@ -132,7 +132,7 @@ class OrderUpdateShipping(BaseMutation):order.shipping_price = ZERO_TAXED_MONEYorder.shipping_method_name = Noneorder.save()- return OrderUpdateShipping(order=order, shipping_method=None)+ return OrderUpdateShipping(order=order)method = cls.get_node_or_error(info, input['shipping_method'], errors,@@ -163,12 +163,10 @@ class OrderUpdateShipping(BaseMutation):order.shipping_price = method.get_total_price(info.context.taxes)order.shipping_method_name = method.nameorder.save()- return OrderUpdateShipping(order=order, shipping_method=method)+ return OrderUpdateShipping(order=order)order = graphene.Field(Order, description='Order with updated shipping method.')- shipping_method = graphene.Field(- ShippingMethod, description='Shipping method assigned to the order.')class OrderAddNoteInput(graphene.InputObjectType):diff --git a/tests/api/test_order.py b/tests/api/test_order.pyindex 92e01b159f..583b3a1211 100644--- a/tests/api/test_order.py+++ b/tests/api/test_order.py@@ -677,9 +677,6 @@ ORDER_UPDATE_SHIPPING_QUERY = """fieldmessage}- shippingMethod {- id- }order {id}@@ -700,7 +697,6 @@ def test_order_update_shipping(reverse('api'), {'query': query, 'variables': variables})content = get_graphql_content(response)data = content['data']['orderUpdateShipping']- assert data['shippingMethod']['id'] == method_idassert data['order']['id'] == order_idorder.refresh_from_db()