diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-11 18:26:59 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-11 18:26:59 +0200 | 
| commit | 253023f6c3480e75d1b9977ff2d2869af4262a29 (patch) | |
| tree | 96fee714f84d06390563bb928ed2a71497efbe5b /archaeological_context_records/models.py | |
| parent | ed8291ebd2c5613a9bddffd9380c9f61a08303dd (diff) | |
| download | Ishtar-253023f6c3480e75d1b9977ff2d2869af4262a29.tar.bz2 Ishtar-253023f6c3480e75d1b9977ff2d2869af4262a29.zip  | |
Shortcut menu: limit simple menu to 100 entries by types
Diffstat (limited to 'archaeological_context_records/models.py')
| -rw-r--r-- | archaeological_context_records/models.py | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index af042bf45..5dc943275 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -236,12 +236,13 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):              Q(history_creator=user)      @classmethod -    def get_owns(cls, user, menu_filtr=None): +    def get_owns(cls, user, menu_filtr=None, limit=None):          replace_query = {}          if menu_filtr:              replace_query = {'operation': menu_filtr} -        owns = super(ContextRecord, cls).get_owns(user, -                                                  replace_query=replace_query) +        owns = super(ContextRecord, cls).get_owns( +            user, replace_query=replace_query, +            limit=limit)          return sorted(owns, key=lambda x: x.cached_label)      def full_label(self):  | 
