Alter Product slug field to allow null values

Changed the `slug` field in the `Product` model to allow null values by setting `null=True`. This ensures better flexibility when handling cases where a slug might not be immediately available.
This commit is contained in:
Egor Pavlovich Gorbunov 2025-04-30 16:49:54 +03:00
parent 2c8c8ba291
commit e41ac426f4

View file

@ -14,6 +14,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='product',
name='slug',
field=django_extensions.db.fields.AutoSlugField(allow_unicode=True, blank=True, editable=False, populate_from=('uuid', 'category.name', 'brand.name', 'name'), unique=True),
field=django_extensions.db.fields.AutoSlugField(allow_unicode=True, blank=True, editable=False, null=True, populate_from=('uuid', 'category.name', 'brand.name', 'name'), unique=True),
),
]