Skip to content

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

Fix migration 0112 for products

Tomasz Szymanskibf8f1236a12f
diff --git a/saleor/product/migrations/0112_auto_20200129_0050.py b/saleor/product/migrations/0112_auto_20200129_0050.py
index 6d3427bfbf..735d2df415 100644
--- a/saleor/product/migrations/0112_auto_20200129_0050.py
+++ b/saleor/product/migrations/0112_auto_20200129_0050.py
@@ -19,9 +19,11 @@ def create_unique_slugs_for_producttypes(apps, schema_editor):
first_char = product_type.name[0].lower()
if first_char != previous_char:
previous_char = first_char
- slug_values = ProductType.objects.filter(
- slug__istartswith=first_char
- ).values_list("slug", flat=True)
+ slug_values = list(
+ ProductType.objects.filter(slug__istartswith=first_char).values_list(
+ "slug", flat=True
+ )
+ )
slug = generate_unique_slug(product_type, slug_values)
product_type.slug = slug