Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Optimize products prefetching for webhooks (#9014)

Tomasz Szymańskib595a4221265
diff --git a/saleor/product/models.py b/saleor/product/models.py
index 7b51d728a8..660668f3bf 100644
--- a/saleor/product/models.py
+++ b/saleor/product/models.py
@@ -377,6 +377,8 @@ class ProductsQueryset(models.QuerySet):
"variants__attributes__assignment__attribute",
"variants__variant_media__media",
"variants__stocks__allocations",
+ "variants__channel_listings__channel",
+ "channel_listings__channel",
)
if single_object:
return self.prefetch_related(*common_fields)