From 7a49dcba992f7b51edb2b3e444bf9f4d825b6f7b Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 30 Jan 2019 12:07:35 +0100 Subject: [PATCH] Increase limit in owner maps page fix #651 --- umap/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/umap/views.py b/umap/views.py index 1cf540fe..a1cf8eed 100644 --- a/umap/views.py +++ b/umap/views.py @@ -142,11 +142,13 @@ class UserMaps(DetailView, PaginatorMixin): owner = self.request.user == self.object manager = Map.objects if owner else Map.public maps = manager.filter(Q(owner=self.object) | Q(editors=self.object)) - maps = maps.distinct().order_by('-modified_at')[:50] if owner: per_page = settings.UMAP_MAPS_PER_PAGE_OWNER + limit = 100 else: per_page = settings.UMAP_MAPS_PER_PAGE + limit = 50 + maps = maps.distinct().order_by('-modified_at')[:limit] maps = self.paginate(maps, per_page) kwargs.update({ "maps": maps