Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Change ORDER_INVALID_SHIPPING_METHOD to SHIPPING_METHOD_NOT_APPLICABLE
Aleksander Spyra5a3e6b37520d
diff --git a/saleor/graphql/order/mutations/orders.py b/saleor/graphql/order/mutations/orders.pyindex 6ff8b93e53..ca9afe2f54 100644--- a/saleor/graphql/order/mutations/orders.py+++ b/saleor/graphql/order/mutations/orders.py@@ -47,7 +47,7 @@ def clean_order_update_shipping(order, method):{"shipping_method": ValidationError("Shipping method cannot be used with this order.",- code=OrderErrorCode.ORDER_INVALID_SHIPPING_METHOD,+ code=OrderErrorCode.SHIPPING_METHOD_NOT_APPLICABLE,)})diff --git a/saleor/graphql/order/utils.py b/saleor/graphql/order/utils.pyindex c03dab0772..b342152d64 100644--- a/saleor/graphql/order/utils.py+++ b/saleor/graphql/order/utils.py@@ -28,7 +28,7 @@ def validate_shipping_method(order):{"shipping": ValidationError("Shipping method is not valid for chosen shipping address",- code=OrderErrorCode.ORDER_INVALID_SHIPPING_METHOD,+ code=OrderErrorCode.SHIPPING_METHOD_NOT_APPLICABLE,)})diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex f768848164..f086b8d379 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -2341,11 +2341,11 @@ enum OrderErrorCode {GRAPHQL_ERRORINVALIDNOT_FOUND- ORDER_INVALID_SHIPPING_METHODORDER_NO_SHIPPING_ADDRESSPAYMENT_ERRORPAYMENT_MISSINGREQUIRED+ SHIPPING_METHOD_NOT_APPLICABLESHIPPING_METHOD_REQUIREDUNIQUEVOID_INACTIVE_PAYMENTdiff --git a/saleor/order/error_codes.py b/saleor/order/error_codes.pyindex 2040b5e92b..33b2c85f53 100644--- a/saleor/order/error_codes.py+++ b/saleor/order/error_codes.py@@ -12,11 +12,11 @@ class OrderErrorCode(Enum):GRAPHQL_ERROR = "graphql_error"INVALID = "invalid"NOT_FOUND = "not_found"- ORDER_INVALID_SHIPPING_METHOD = "order_invalid_shipping_method"ORDER_NO_SHIPPING_ADDRESS = "order_no_shipping_address"PAYMENT_ERROR = "payment_error"PAYMENT_MISSING = "payment_missing"REQUIRED = "required"+ SHIPPING_METHOD_NOT_APPLICABLE = "shipping_method_not_applicable"SHIPPING_METHOD_REQUIRED = "shipping_method_required"UNIQUE = "unique"VOID_INACTIVE_PAYMENT = "void_inactive_payment"