Browse Source

Fix mismatch of classifier name and slug max_length (#587)

Change the max_length of the classifier slug field to match the
classifier name field max_length.
Jeremy Childers 1 year ago
parent
commit
7cb028fe5f

+ 22 - 0
coderedcms/migrations/0038_alter_classifier_slug.py

@@ -0,0 +1,22 @@
+# Generated by Django 4.1.10 on 2023-07-12 18:53
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+    dependencies = [
+        ("coderedcms", "0037_coderedpage_related_classifier_term_and_more"),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name="classifier",
+            name="slug",
+            field=models.SlugField(
+                allow_unicode=True,
+                max_length=255,
+                unique=True,
+                verbose_name="Slug",
+            ),
+        ),
+    ]

+ 1 - 0
coderedcms/models/snippet_models.py

@@ -141,6 +141,7 @@ class Classifier(ClusterableModel):
         allow_unicode=True,
         unique=True,
         verbose_name=_("Slug"),
+        max_length=255,
     )
     name = models.CharField(
         max_length=255,