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:
parent
f2e319f477
commit
2c8c8ba291
2 changed files with 2 additions and 2 deletions
|
|
@ -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),
|
||||
),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
),
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue