Update Product slug field configuration in migrations

Made the `slug` field nullable in migration 0013 before reverting this change in migration 0014. Additionally, altered the population logic to always include `uuid`.
This commit is contained in:
Egor Pavlovich Gorbunov 2025-04-30 16:46:58 +03:00
parent f2e319f477
commit 2c8c8ba291
2 changed files with 2 additions and 2 deletions

View file

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

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, null=True, populate_from=('uuid', 'category.name', 'brand.name', 'name'), unique=True),
field=django_extensions.db.fields.AutoSlugField(allow_unicode=True, blank=True, editable=False, populate_from=('uuid', 'category.name', 'brand.name', 'name'), unique=True),
),
]