From 6ebe53884bda07026d7eb1cfb7d093d95465e8b3 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 27 Mar 2026 11:58:12 +0100 Subject: 🗃️ author type - models: add hierarchy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/migrations/0275_authortype_parent.py | 24 ++++++++++++++++++++++ ishtar_common/models.py | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ishtar_common/migrations/0275_authortype_parent.py diff --git a/ishtar_common/migrations/0275_authortype_parent.py b/ishtar_common/migrations/0275_authortype_parent.py new file mode 100644 index 000000000..279bcaff5 --- /dev/null +++ b/ishtar_common/migrations/0275_authortype_parent.py @@ -0,0 +1,24 @@ +# Generated by Django 4.2.19 on 2026-03-27 10:50 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('ishtar_common', '0274_qualifiedbiographicalnote'), + ] + + operations = [ + migrations.AddField( + model_name='authortype', + name='parent', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='ishtar_common.authortype', verbose_name='Parent'), + ), + migrations.AlterField( + model_name='qualifiedbiographicalnotetype', + name='order', + field=models.IntegerField(default=10, verbose_name='Order'), + ), + ] diff --git a/ishtar_common/models.py b/ishtar_common/models.py index c8a2f4f45..04defbd81 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -4581,7 +4581,7 @@ class Basket(FullSearch, OwnPerms, ValueGetter, TemplateItem): return new_item -class AuthorType(GeneralType): +class AuthorType(HierarchicalType): order = models.IntegerField(_("Order"), default=1) class Meta: -- cgit v1.2.3