Merge pull request #1415 from umap-project/optim-sql

Do not exclude DEMO and SHOWCASE maps anymore from home
This commit is contained in:
Yohan Boniface 2023-11-21 20:54:34 +01:00 committed by GitHub
commit a128b724ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -140,8 +140,6 @@ class Home(PaginatorMixin, TemplateView, PublicMapsMixin):
demo_map = Map.public.get(pk=settings.UMAP_DEMO_PK) demo_map = Map.public.get(pk=settings.UMAP_DEMO_PK)
except Map.DoesNotExist: except Map.DoesNotExist:
pass pass
else:
maps = maps.exclude(id=demo_map.pk)
showcase_map = None showcase_map = None
if hasattr(settings, "UMAP_SHOWCASE_PK"): if hasattr(settings, "UMAP_SHOWCASE_PK"):
@ -149,8 +147,6 @@ class Home(PaginatorMixin, TemplateView, PublicMapsMixin):
showcase_map = Map.public.get(pk=settings.UMAP_SHOWCASE_PK) showcase_map = Map.public.get(pk=settings.UMAP_SHOWCASE_PK)
except Map.DoesNotExist: except Map.DoesNotExist:
pass pass
else:
maps = maps.exclude(id=showcase_map.pk)
maps = self.paginate(maps, settings.UMAP_MAPS_PER_PAGE) maps = self.paginate(maps, settings.UMAP_MAPS_PER_PAGE)