Fixed query.
This commit is contained in:
parent
f495240701
commit
8ab43b9ae1
1 changed files with 2 additions and 3 deletions
|
@ -552,9 +552,8 @@ def aktivniResitele(rocnik,cislo):
|
||||||
if int(cislo) > 3:
|
if int(cislo) > 3:
|
||||||
problemy = Problem.objects.filter(cislo_zadani = letos.cisla)
|
problemy = Problem.objects.filter(cislo_zadani = letos.cisla)
|
||||||
else:
|
else:
|
||||||
problemy = Problem.objects.filter(Q(cislo_zadani = letos.cisla)|Q(cislo_zadani=loni.cisla))
|
problemy = Problem.objects.filter(Q(cislo_zadani__in = letos.cisla)|Q(cislo_zadani__in = loni.cisla))
|
||||||
resitele = aktualni_resitele.filter(reseni = Reseni.objects.filter(problem=problemy)).distinct()
|
resitele = aktualni_resitele.filter(reseni__in = Reseni.objects.filter(problem__in=problemy)).distinct()
|
||||||
|
|
||||||
return resitele
|
return resitele
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue