Fix syntax

This commit is contained in:
Pavel "LEdoian" Turinsky 2020-10-27 22:35:36 +01:00
parent e5553126bc
commit b2539d6a24

View file

@ -48,8 +48,7 @@ class TabulkaOdevzdanychReseniView(TemplateView):
reseni_k_tomuto_problemu = m.Reseni.objects.filter( reseni_k_tomuto_problemu = m.Reseni.objects.filter(
resitele__in=[resitel], # Snad funguje i takhle resitele__in=[resitel], # Snad funguje i takhle
hodnoceni__problem__in=[problem], # ditto hodnoceni__problem__in=[problem], # ditto
) ).order_by('-cas_doruceni')
.order_by('-cas_doruceni')
pocet_reseni = reseni_k_tomuto_problemu.count() pocet_reseni = reseni_k_tomuto_problemu.count()
nejnovejsi = reseni_k_tomuto_problemu.first().cas_doruceni nejnovejsi = reseni_k_tomuto_problemu.first().cas_doruceni
pocet_bodu = max( pocet_bodu = max(
@ -65,6 +64,7 @@ class TabulkaOdevzdanychReseniView(TemplateView):
posledni_odevzdani=nejnovejsi, posledni_odevzdani=nejnovejsi,
body=pocet_bodu, body=pocet_bodu,
) )
)
return ctx return ctx
class ReseniProblemuView(ListView): class ReseniProblemuView(ListView):