diff --git a/src/agenda_culturel/migrations/0101_alter_tag_category.py b/src/agenda_culturel/migrations/0101_alter_tag_category.py new file mode 100644 index 0000000..290741f --- /dev/null +++ b/src/agenda_culturel/migrations/0101_alter_tag_category.py @@ -0,0 +1,19 @@ +# Generated by Django 4.2.9 on 2024-11-02 14:13 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('agenda_culturel', '0100_tag_category'), + ] + + operations = [ + migrations.AlterField( + model_name='tag', + name='category', + field=models.ForeignKey(blank=True, default=None, help_text='This tags corresponds to a sub-category of the given category', null=True, on_delete=django.db.models.deletion.SET_NULL, to='agenda_culturel.category', verbose_name='Category'), + ), + ] diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 80c9ce6..969ed3b 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -191,6 +191,7 @@ class Tag(models.Model): verbose_name=_("Category"), help_text=_("This tags corresponds to a sub-category of the given category"), null=True, + blank=True, default=None, on_delete=models.SET_NULL, )