From f58a640f9873360c7e2d399cf3d6ff2e65474d5b Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Sun, 19 Sep 2021 03:38:19 +0200 Subject: [PATCH] =?UTF-8?q?Odevzd=C3=A1v=C3=A1tko:=20tabulka=20body=20s?= =?UTF-8?q?=C4=8D=C3=ADt=C3=A1=20m=C3=ADsto=20maximov=C3=A1n=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/views/odevzdavatko.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seminar/views/odevzdavatko.py b/seminar/views/odevzdavatko.py index 224acbd2..cd8ba7ed 100644 --- a/seminar/views/odevzdavatko.py +++ b/seminar/views/odevzdavatko.py @@ -120,7 +120,7 @@ class TabulkaOdevzdanychReseniView(ListView): tabulka[problem][resitel] = SouhrnReseni(pocet_reseni=1, posledni_odevzdani=cas, body=body) else: tabulka[problem][resitel].posledni_odevzdani = max(tabulka[problem][resitel].posledni_odevzdani, cas) - tabulka[problem][resitel].body = max(tabulka[problem][resitel].body, body, + tabulka[problem][resitel].body = sum(tabulka[problem][resitel].body, body, key=lambda x: x if x is not None else -1 # None je malé číslo # FIXME: Možná dává smysl i mít None jako velké číslo -- jakože "TODO: zadat body" )