|
@ -90,4 +90,7 @@ class UlohaVzorakNodeViewSet(PermissionMixin, viewsets.ModelViewSet): |
|
|
nazev = self.request.query_params.get('nazev',None) |
|
|
nazev = self.request.query_params.get('nazev',None) |
|
|
if nazev is not None: |
|
|
if nazev is not None: |
|
|
queryset = queryset.filter(nazev__contains=nazev) |
|
|
queryset = queryset.filter(nazev__contains=nazev) |
|
|
|
|
|
if self.request.user.has_perm('auth.org'): |
|
|
return queryset |
|
|
return queryset |
|
|
|
|
|
else: # pro neorgy jen zveřejněné vzoráky |
|
|
|
|
|
return queryset.filter(uloha__cislo_reseni__verejne_db=True) |
|
|