Skip to content

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

Generate GraphQL schema

Pacu23f1b8e16f1ee
diff --git a/saleor/graphql/order/mutations/orders.py b/saleor/graphql/order/mutations/orders.py
index aa60817185..19147d778c 100644
--- a/saleor/graphql/order/mutations/orders.py
+++ b/saleor/graphql/order/mutations/orders.py
@@ -129,7 +129,7 @@ class OrderUpdateShipping(BaseMutation):
'Shipping method is required for this order.')
return OrderUpdateShipping(errors=errors)
order.shipping_method = None
- order.shipping_price == ZERO_TAXED_MONEY
+ order.shipping_price = ZERO_TAXED_MONEY
order.shipping_method_name = None
order.save()
return OrderUpdateShipping(order=order, shipping_method=None)
diff --git a/tests/api/test_order.py b/tests/api/test_order.py
index 9f7870401b..92e01b159f 100644
--- a/tests/api/test_order.py
+++ b/tests/api/test_order.py
@@ -712,7 +712,12 @@ def test_order_update_shipping(
def test_order_update_shipping_clear_shipping_method(
- admin_api_client, order, admin_user):
+ admin_api_client, order, admin_user, shipping_method):
+ order.shipping_method = shipping_method
+ order.shipping_price = shipping_method.get_total_price()
+ order.shipping_method_name = 'Example shipping'
+ order.save()
+
query = ORDER_UPDATE_SHIPPING_QUERY
order_id = graphene.Node.to_global_id('Order', order.id)
variables = json.dumps({'order': order_id, 'shippingMethod': None})