Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove ShippingErrorCode
Aleksander Spyra079cabac2849
diff --git a/saleor/graphql/core/utils/error_codes.py b/saleor/graphql/core/utils/error_codes.pyindex e6c50156ab..0d7d58b7d5 100644--- a/saleor/graphql/core/utils/error_codes.py+++ b/saleor/graphql/core/utils/error_codes.py@@ -100,6 +100,7 @@ class CommonErrorCode(Enum):INVALID_STOREFRONT_URL = "invalid_storefront_url"INVALID_TOKEN = "invalid_token"INVALID_WEIGHT_UNIT = "invalid_weight_unit"+ MAX_LESS_THAN_MIN = "max_less_than_min"MISSING_VALUE = "missing_value"NON_BLANK_VALUE_REQUIRED = "non_blank_value_required"OBJECT_ALREADY_EXISTS = "object_already_exists"@@ -129,10 +130,6 @@ class ProductErrorCode(Enum):NOT_PRODUCTS_IMAGE = "not_products_image"-class ShippingErrorCode(Enum):- MAX_LESS_THAN_MIN = "max_less_than_min"--SALEOR_ERROR_CODE_ENUMS = [AccountErrorCode,CheckoutErrorCode,@@ -142,7 +139,6 @@ SALEOR_ERROR_CODE_ENUMS = [AttributeErrorCode,DigitalContentErrorCode,ProductErrorCode,- ShippingErrorCode,]saleor_error_codes = []diff --git a/saleor/graphql/shipping/mutations.py b/saleor/graphql/shipping/mutations.pyindex f14afab9d3..e6c7fefa8e 100644--- a/saleor/graphql/shipping/mutations.py+++ b/saleor/graphql/shipping/mutations.py@@ -5,7 +5,7 @@ from ...dashboard.shipping.forms import default_shipping_zone_existsfrom ...shipping import modelsfrom ..core.mutations import BaseMutation, ModelDeleteMutation, ModelMutationfrom ..core.scalars import Decimal, WeightScalar-from ..core.utils.error_codes import CommonErrorCode, ShippingErrorCode+from ..core.utils.error_codes import CommonErrorCodefrom .enums import ShippingMethodTypeEnumfrom .types import ShippingMethod, ShippingZone@@ -140,7 +140,7 @@ class ShippingPriceMixin:"Maximum order price should be larger than ""the minimum order price."),- code=ShippingErrorCode.MAX_LESS_THAN_MIN,+ code=CommonErrorCode.MAX_LESS_THAN_MIN,)})@@ -159,7 +159,7 @@ class ShippingPriceMixin:"Maximum order weight should be larger than the ""minimum order weight."),- code=ShippingErrorCode.MAX_LESS_THAN_MIN,+ code=CommonErrorCode.MAX_LESS_THAN_MIN,)})