From 0b835ef9d496991b070bd795efc748a848ab473f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Tue, 20 Dec 2022 12:40:55 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=C5=99e=C5=A1itel=C3=A9=20maj=C3=AD=20b?= =?UTF-8?q?=C3=BDt=20vid=C4=9Bt=20jen=20ti,=20kte=C5=99=C3=AD=20neodmaturo?= =?UTF-8?q?vali?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/views/autocomplete.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/views/autocomplete.py b/api/views/autocomplete.py index 10e0bca9..601f4e35 100644 --- a/api/views/autocomplete.py +++ b/api/views/autocomplete.py @@ -51,7 +51,10 @@ class PublicResitelAutocomplete(LoginRequiredAjaxMixin, autocomplete.Select2Quer především v odevzdávátku. """ def get_queryset(self): + letos = m.Nastaveni.get_solo().aktualni_rocnik qs = m.Resitel.objects.filter( + rok_maturity__gte=letos.druhy_rok() + ).filter( prezdivka_resitele__isnull=False ).exclude( prezdivka_resitele=""