dedline na titulní straně prioritně soustřeďkový

This commit is contained in:
Kateřina Č 2021-01-20 09:02:47 +01:00
parent 4a67629005
commit 0d3a10860b

View file

@ -568,6 +568,8 @@ class TitulniStranaView(generic.ListView):
try: try:
nejblizsi_deadline = sorted(filter(lambda dl: dl[0] is not None and dl[0] >= date.today(), [deadline_soustredeni, preddeadline, deadline]))[0] nejblizsi_deadline = sorted(filter(lambda dl: dl[0] is not None and dl[0] >= date.today(), [deadline_soustredeni, preddeadline, deadline]))[0]
if nejblizsi_deadline[0] == deadline_soustredeni[0]:
nejblizsi_deadline = deadline_soustredeni
except IndexError: except IndexError:
nejblizsi_deadline = (None, None) # neni zadna aktualni deadline nejblizsi_deadline = (None, None) # neni zadna aktualni deadline