Merge pull request #1084 from umap-project/1025-no-limits

Remove the limit of visible maps in user’s view
This commit is contained in:
David Larlet 2023-05-12 14:54:07 -04:00 committed by GitHub
commit ffeabb7d49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)