From 148b58dcbe01c00d0ac096ae72d70686802e758f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 23 Jul 2014 09:46:45 +0200 Subject: Manage empty get_owns --- archaeological_files/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'archaeological_files') diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 6a6da0e57..04a723b82 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -224,9 +224,9 @@ class File(BaseHistorizedItem, OwnPerms, ValueGetter, ShortMenuItem): @classmethod def get_owns(cls, user): - owns = list(super(File, cls).get_owns(user)) - return sorted(owns, key=lambda x:(x.has_adminact, - x.delay_date)) + owns = super(File, cls).get_owns(user) + return sorted(owns.all(), key=lambda x:(x.has_adminact, + x.delay_date)) @classmethod def get_years(cls): -- cgit v1.2.3