Skip to content

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

Make variant prices more expensive than base product price

Mira Szewczyka77395cf3d4e
diff --git a/saleor/core/utils/random_data.py b/saleor/core/utils/random_data.py
index 615fa91266..8784762f50 100644
--- a/saleor/core/utils/random_data.py
+++ b/saleor/core/utils/random_data.py
@@ -215,7 +215,7 @@ def create_products_by_class(product_class, schema,
sku = '%s-%s' % (product.pk, i)
kwargs = {'attributes': attr_combination, 'sku': sku}
if schema.get('different_variant_prices'):
- kwargs['price_override'] = next(prices)
+ kwargs['price_override'] = product.price + next(prices)
create_variant(product, **kwargs)
if not variant_combinations: