From 87a209bf2a8b71a701f7f954bfd2738ac62ea70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Tue, 3 Jan 2023 00:13:29 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20nekone=C4=8Dn=C3=A9=20desetin=C3=A9=20ro?= =?UTF-8?q?zvoje?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/models/odevzdavatko.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seminar/models/odevzdavatko.py b/seminar/models/odevzdavatko.py index 2611b334..82a75bc6 100644 --- a/seminar/models/odevzdavatko.py +++ b/seminar/models/odevzdavatko.py @@ -1,3 +1,4 @@ +import decimal import os import reversion @@ -123,7 +124,7 @@ class Hodnoceni(bm.SeminarModelBase): # TODO najít správné místo @staticmethod def inverze_vzorecku_na_prepocet(body, resitelu): - return body * (resitelu + 2) / 3 + return decimal.Context(prec=1).create_decimal_from_float(body * (resitelu + 2) / 3) @property def body_celkem(self):