From b5a676684f3a4b85682934a6c1c251559131be28 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 9 May 2024 12:36:12 +0200 Subject: 🐛 fix hierarchical ordering in admin and forms (refs #5797) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_operations/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'archaeological_operations/models.py') diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 83e60866d..9d1a54d7d 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -111,7 +111,7 @@ class Period(GeneralType): class Meta: verbose_name = _("Type Period") verbose_name_plural = _("Types Period") - ordering = ("order",) + ordering = ("order", "label") def __str__(self): return self.label @@ -127,7 +127,7 @@ class ReportState(GeneralType): class Meta: verbose_name = _("Type of report state") verbose_name_plural = _("Types of report state") - ordering = ("order",) + ordering = ("order", "label") post_save.connect(post_save_cache, sender=ReportState) @@ -145,7 +145,7 @@ class RecordQualityType(GeneralType): class Meta: verbose_name = _("Type of record quality") verbose_name_plural = _("Types of record quality") - ordering = ("order",) + ordering = ("order", "label") class CulturalAttributionType(HierarchicalType): @@ -154,7 +154,7 @@ class CulturalAttributionType(HierarchicalType): class Meta: verbose_name = _("Cultural attribution type") verbose_name_plural = _("Cultural attribution types") - ordering = ("order",) + ordering = ("order", "label") post_save.connect(post_save_cache, sender=RecordQualityType) -- cgit v1.2.3