From da1e25be2a9cfe8e3b483331805b677a37aa1f85 Mon Sep 17 00:00:00 2001 From: David Larlet Date: Fri, 12 May 2023 13:51:39 -0400 Subject: [PATCH] =?UTF-8?q?Remove=20the=20limit=20of=20visible=20maps=20in?= =?UTF-8?q?=20user=E2=80=99s=20view?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It should not have any performance issue given that we paginate over the list anyway. Fix #1025 --- umap/views.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/umap/views.py b/umap/views.py index c2e7f269..3c8f87c7 100644 --- a/umap/views.py +++ b/umap/views.py @@ -160,11 +160,9 @@ class UserMaps(DetailView, PaginatorMixin): maps = manager.filter(Q(owner=self.object) | Q(editors=self.object)) 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 = maps.distinct().order_by("-modified_at") maps = self.paginate(maps, per_page) kwargs.update({"maps": maps}) return super(UserMaps, self).get_context_data(**kwargs)