Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Use search_index_dirty on ProductTypeUpdate mutation (#10973)
Krzysztof Kwaśniak8406dce8d1b7
diff --git a/saleor/graphql/product/mutations/product_type_update.py b/saleor/graphql/product/mutations/product_type_update.pyindex af5045cd98..7f50d12bf1 100644--- a/saleor/graphql/product/mutations/product_type_update.py+++ b/saleor/graphql/product/mutations/product_type_update.py@@ -2,7 +2,6 @@ import graphenefrom ....core.permissions import ProductTypePermissionsfrom ....product import models-from ....product.search import update_products_search_vectorfrom ....product.tasks import update_variants_namesfrom ...core.types import ProductErrorfrom ..types import ProductType@@ -43,5 +42,6 @@ class ProductTypeUpdate(ProductTypeCreate):"product_attributes" in cleaned_inputor "variant_attributes" in cleaned_input):- products = models.Product.objects.filter(product_type=instance)- update_products_search_vector(products)+ models.Product.objects.filter(product_type=instance).update(+ search_index_dirty=True+ )