Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Drop handle_typed_errors from AttributeAssign and ShippingZoneMixin mutations
IKarbowiak98ff707f1986
diff --git a/saleor/graphql/product/mutations/attributes.py b/saleor/graphql/product/mutations/attributes.pyindex 9bed71c771..72ae6737d1 100644--- a/saleor/graphql/product/mutations/attributes.py+++ b/saleor/graphql/product/mutations/attributes.py@@ -382,20 +382,6 @@ class AttributeAssign(BaseMutation):})- @classmethod- def handle_typed_errors(cls, errors: list, **extra):- typed_errors = [- cls._meta.error_type_class( # type: ignore- field=e.field,- message=e.message,- code=code,- attributes=params.get("attributes") if params else None,- )- for e, code, params in errors- ]- extra.update({cls._meta.error_type_field: typed_errors}) # type: ignore- return cls(errors=[e[0] for e in errors], **extra) # type: ignore-@classmethoddef clean_operations(cls, product_type, product_attrs_pks, variant_attrs_pks):"""Ensure the attributes are not already assigned to the product type."""diff --git a/saleor/graphql/shipping/mutations.py b/saleor/graphql/shipping/mutations.pyindex 2f9308ae69..6f3c220439 100644--- a/saleor/graphql/shipping/mutations.py+++ b/saleor/graphql/shipping/mutations.py@@ -98,20 +98,6 @@ class ShippingZoneMixin:cleaned_input["default"] = Falsereturn cleaned_input- @classmethod- def handle_typed_errors(cls, errors: list, **extra):- typed_errors = [- cls._meta.error_type_class( # type: ignore- field=e.field,- message=e.message,- code=code,- warehouses=params.get("warehouses") if params else None,- )- for e, code, params in errors- ]- extra.update({cls._meta.error_type_field: typed_errors}) # type: ignore- return cls(errors=[e[0] for e in errors], **extra) # type: ignore-@classmethod@transaction.atomicdef _save_m2m(cls, info, instance, cleaned_data):