Skip to content

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

Fallback for SKU if VariantName and attributes are missing

Pacu288d83c38406e
diff --git a/saleor/product/models.py b/saleor/product/models.py
index 5a397a1691..497df12458 100644
--- a/saleor/product/models.py
+++ b/saleor/product/models.py
@@ -199,7 +199,7 @@ class ProductVariant(models.Model):
app_label = 'product'
def __str__(self):
- return self.name
+ return self.name or self.sku
@property
def quantity_available(self):