From 4f7b64fae2f5bdcfcadfb63c4f7bfbab2471f514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Mon, 6 Feb 2023 23:16:17 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20maximum=20bod=C5=AF=20pro=20hodnocen?= =?UTF-8?q?=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/models/odevzdavatko.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seminar/models/odevzdavatko.py b/seminar/models/odevzdavatko.py index 2d937a41..71b6fb51 100644 --- a/seminar/models/odevzdavatko.py +++ b/seminar/models/odevzdavatko.py @@ -171,7 +171,7 @@ class Hodnoceni(bm.SeminarModelBase): @property def body_max(self): - if not isinstance(Hodnoceni.objects.first().problem, am.Uloha): + if not isinstance(self.problem, am.Uloha): return None return self.problem.uloha.max_body