From 7a504b1f0b3c58875ea852e94c0da05bd9d84890 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 11 Oct 2016 18:26:59 +0200 Subject: Shortcut menu: limit simple menu to 100 entries by types --- archaeological_files/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'archaeological_files/models.py') diff --git a/archaeological_files/models.py b/archaeological_files/models.py index b116d1f1c..3721e4d3d 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -340,8 +340,8 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, return cls @classmethod - def get_owns(cls, user, menu_filtr=None): - owns = super(File, cls).get_owns(user) + def get_owns(cls, user, menu_filtr=None, limit=None): + owns = super(File, cls).get_owns(user, limit=limit) return sorted(owns, key=lambda x: x.cached_label) def get_values(self, prefix=''): -- cgit v1.2.3