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