Skip to content

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

Simplify generating slug for warehouse in random_data

IKarbowiak5bb60b8e056c
diff --git a/saleor/core/utils/random_data.py b/saleor/core/utils/random_data.py
index 8508890e20..6b3272a5e0 100644
--- a/saleor/core/utils/random_data.py
+++ b/saleor/core/utils/random_data.py
@@ -14,13 +14,11 @@ from django.contrib.sites.models import Site
from django.core.files import File
from django.db.models import Q
from django.utils import timezone
-from django.utils.encoding import smart_text
from django.utils.text import slugify
from faker import Factory
from faker.providers import BaseProvider
from measurement.measures import Weight
from prices import Money, TaxedMoney
-from text_unidecode import unidecode
from ...account.models import Address, User
from ...account.utils import store_user_address
@@ -949,7 +947,7 @@ def create_warehouses():
shipping_zone_name = shipping_zone.name
warehouse, _ = Warehouse.objects.update_or_create(
name=shipping_zone_name,
- slug=slugify(smart_text(unidecode(shipping_zone_name))),
+ slug=slugify(shipping_zone_name),
defaults={"company_name": fake.company(), "address": create_address()},
)
warehouse.shipping_zones.add(shipping_zone)