From c130ab842649e3d5f9028dcb2131526c44822ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Tue, 30 Jan 2024 00:11:13 +0100 Subject: [PATCH] =?UTF-8?q?Zrychlen=C3=AD=20na=C4=8D=C3=ADt=C3=A1n=C3=AD?= =?UTF-8?q?=20archivu=20soust=C5=99ed=C4=9Bn=C3=AD=20pro=20=C3=BA=C4=8Dast?= =?UTF-8?q?n=C3=ADky?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- soustredeni/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/soustredeni/views.py b/soustredeni/views.py index da59e779..f2aafdf7 100644 --- a/soustredeni/views.py +++ b/soustredeni/views.py @@ -18,12 +18,14 @@ class SoustredeniListView(generic.ListView): template_name = 'soustredeni/seznam_soustredeni.html' def get_queryset(self): + if not self.request.user.je_org: + return super().get_queryset() return ( Soustredeni.objects .prefetch_related( "ucastnici", "ucastnici__osoba", "organizatori", "organizatori__osoba", - "galerie_set" + "galerie_set", ) .select_related("rocnik") )