From 8d99b085767d5c400153ba836c03f0bd5a6edbf1 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 25 Jul 2014 10:07:04 +0200 Subject: Rollback to alphabetic order for short menu (refs #1562) --- archaeological_operations/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'archaeological_operations') diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 2c148366b..e27e5c0dc 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -229,7 +229,8 @@ class Operation(BaseHistorizedItem, OwnPerms, ValueGetter, ShortMenuItem): def get_owns(cls, user): owns = super(Operation, cls).get_owns(user) #owns = owns.annotate(null_count=Count('operation_code')) - return owns.order_by("common_name", "-year", "operation_code") + #return owns.order_by("common_name", "-year", "operation_code") + return sorted(owns.all(), key=lambda x:x.cached_label) def __unicode__(self): if self.cached_label: -- cgit v1.2.3