diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2014-07-23 09:46:45 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2014-07-23 09:46:45 +0200 |
commit | b20d8d8174e061eeb8447f6346b0aced164fbac7 (patch) | |
tree | 9e35618886518e28f32edb74cc39b58480bba033 /archaeological_files/models.py | |
parent | c91c074a6125991b355451c6b0ba9991e94d72a7 (diff) | |
download | Ishtar-b20d8d8174e061eeb8447f6346b0aced164fbac7.tar.bz2 Ishtar-b20d8d8174e061eeb8447f6346b0aced164fbac7.zip |
Manage empty get_owns
Diffstat (limited to 'archaeological_files/models.py')
-rw-r--r-- | archaeological_files/models.py | 6 |
1 files changed, 3 insertions, 3 deletions
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): |