Skip to content

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

Stop changing product schema dict

Krzysztof Wolski309eba68c4de
diff --git a/saleor/core/utils/random_data.py b/saleor/core/utils/random_data.py
index 982d7cf480..0602f901fc 100644
--- a/saleor/core/utils/random_data.py
+++ b/saleor/core/utils/random_data.py
@@ -85,9 +85,9 @@ def create_attributes_and_values(attribute_data):
def create_product_class_with_attributes(name, schema):
- product_attributes_schema = schema.pop('product_attributes', {})
- variant_attributes_schema = schema.pop('variant_attributes', {})
- is_shipping_required = schema.pop('is_shipping_required', True)
+ product_attributes_schema = schema.get('product_attributes', {})
+ variant_attributes_schema = schema.get('variant_attributes', {})
+ is_shipping_required = schema.get('is_shipping_required', True)
product_class = get_or_create_product_class(
name=name, is_shipping_required=is_shipping_required)
product_attributes = create_attributes_and_values(