diff options
-rw-r--r-- | archaeological_finds/models_finds.py | 4 | ||||
-rw-r--r-- | archaeological_finds/models_treatments.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index a2080132e..6fe56afe5 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -1358,8 +1358,8 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms, treatments, findtreats = [], [] q = model.objects.filter( find_id=self.pk).order_by( - 'treatment_nb', 'treatment__start_date', - 'treatment__end_date') + '-treatment__year', '-treatment__index', '-treatment__start_date', + '-treatment__end_date') for findtreat in q.distinct().all(): if findtreat.pk in findtreats: continue diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index ad3b92262..5a654cb70 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -202,7 +202,7 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem, ("change_own_treatment", u"Can change own Treatment"), ("delete_own_treatment", u"Can delete own Treatment"), ) - ordering = ("start_date", ) + ordering = ("-year", "-index", "-start_date") def __unicode__(self): if self.cached_label: |