summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2014-07-25 10:07:04 +0200
committerÉtienne Loks <etienne.loks@proxience.com>2014-07-25 10:07:04 +0200
commit8d99b085767d5c400153ba836c03f0bd5a6edbf1 (patch)
treec68a0ea9ceaa05a480b3e39b9c9518b1f2df710b /archaeological_operations
parenta08125ea103ab4f2baa3962aea47f01817749807 (diff)
downloadIshtar-8d99b085767d5c400153ba836c03f0bd5a6edbf1.tar.bz2
Ishtar-8d99b085767d5c400153ba836c03f0bd5a6edbf1.zip
Rollback to alphabetic order for short menu (refs #1562)
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/models.py3
1 files changed, 2 insertions, 1 deletions
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: