From e41ac426f4c5f2f5cb0467009234641011028d3c Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Wed, 30 Apr 2025 16:49:54 +0300 Subject: [PATCH] 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. --- core/migrations/0014_alter_product_slug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/migrations/0014_alter_product_slug.py b/core/migrations/0014_alter_product_slug.py index be337338..b1b5f7f4 100644 --- a/core/migrations/0014_alter_product_slug.py +++ b/core/migrations/0014_alter_product_slug.py @@ -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), ), ]