diff --git a/seminar/views/autocomplete.py b/seminar/views/autocomplete.py
index fbb2b1e7..2b359c67 100644
--- a/seminar/views/autocomplete.py
+++ b/seminar/views/autocomplete.py
@@ -35,7 +35,7 @@ class OdevzdatelnyProblemAutocomplete(autocomplete.Select2QuerySetView):
 		rocnik = nastaveni.aktualni_rocnik
 		# Od tohoto místa dál jsem zkoušel spoustu variací podle https://django-polymorphic.readthedocs.io/en/stable/advanced.html
 		temaQ = Q(Tema___rocnik = rocnik, stav=m.Problem.STAV_ZADANY)
-		ulohaQ = Q(Uloha___cislo_deadline__rocnik = rocnik, stav=m.Problem.STAV_ZADANY)
+		ulohaQ = Q(Uloha___cislo_zadani__rocnik = rocnik, stav=m.Problem.STAV_ZADANY)
 		clanekQ = Q(Clanek___cislo__rocnik = rocnik, stav=m.Problem.STAV_ZADANY)
 		qs = m.Problem.objects.filter(temaQ | ulohaQ | clanekQ)
 		#print(temata, ulohy, clanky)