summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-05-09 12:36:12 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-05-09 12:36:12 +0200
commitb5a676684f3a4b85682934a6c1c251559131be28 (patch)
tree9740239cfaa28bf79b1adf35f6602091ae1d7cb9 /archaeological_operations/models.py
parente770c12bf36346d7f7580e20ea3f1c4386a94ee3 (diff)
downloadIshtar-b5a676684f3a4b85682934a6c1c251559131be28.tar.bz2
Ishtar-b5a676684f3a4b85682934a6c1c251559131be28.zip
🐛 fix hierarchical ordering in admin and forms (refs #5797)
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py8
1 files changed, 4 insertions, 4 deletions
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)