From 4566ddf6dfaa7d6a888e41638238096a4f8f53fc Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 2 Jun 2016 16:07:31 +0200 Subject: Generic management of baskets in owns items --- archaeological_operations/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archaeological_operations') diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 253ea7635..e3453f0cf 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -251,7 +251,7 @@ class Operation(BaseHistorizedItem, OwnPerms, ValueGetter, ShortMenuItem, 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 sorted(owns.all(), key=lambda x: x.cached_label) + return sorted(owns, key=lambda x: x.cached_label) def __unicode__(self): if self.cached_label: -- cgit v1.2.3