Do not 404 if no galleries

This commit is contained in:
Alexandre Iooss 2022-04-17 09:37:07 +02:00
parent 3a61058379
commit 3afbc2b7e1

View file

@ -27,6 +27,7 @@ from .models import Gallery, Photo, Tag
class GalleryDateView(LoginRequiredMixin):
model = Gallery
date_field = "date_start"
allow_empty = True # Do not 404 if no galleries
def get_queryset(self):
"""Hide galleries with only private photos"""