Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove prefetch on variants, not gaining nothing due to variants.all later
Tomasz Szymanski54457bddd520
diff --git a/saleor/graphql/product/mutations/products.py b/saleor/graphql/product/mutations/products.pyindex fa32a6a4a9..6ec87fc807 100644--- a/saleor/graphql/product/mutations/products.py+++ b/saleor/graphql/product/mutations/products.py@@ -1031,17 +1031,6 @@ class ProductUpdate(ProductCreate):})- @classmethod- def get_instance(cls, info, **data):- """Prefetch related fields that are needed to process the mutation."""- object_id = data.get("id")- if object_id:- # Prefetches needed by `product_updated` plugin hook- qs = cls._meta.model.objects.prefetch_related("variants")- return cls.get_node_or_error(info, object_id, only_type="Product", qs=qs)-- return super().get_instance(info, **data)-@classmethod@transaction.atomicdef save(cls, info, instance, cleaned_input):