Skip to content

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

Bags have no collections

Artur Smęt7691bb183e1e
diff --git a/utils/create_random_data.py b/utils/create_random_data.py
index d6b5d3e711..326e8b0dd6 100644
--- a/utils/create_random_data.py
+++ b/utils/create_random_data.py
@@ -103,16 +103,17 @@ def create_items(placeholder_dir, how_many=10):
shirt = create_shirt(category=shirt_category)
create_product_image(shirt, placeholder_dir)
# Bag
- bag = create_bag(category=bag_category)
+ bag = create_bag(category=bag_category, collection=None)
create_product_image(bag, placeholder_dir)
# chance to generate couple of sizes
for size in ShirtVariant.SIZE_CHOICES:
if random.choice([True, False]):
create_variant(shirt, size=size[0])
+
create_variant(bag)
print("Shirt - %s %s Variants" % (shirt, shirt.variants.count()))
- print("Bag - %s %s Variants" % (bag, shirt.variants.count()))
+ print("Bag - %s %s Variants" % (bag, bag.variants.count()))