fix: nekonečné desetiné rozvoje
This commit is contained in:
parent
d9756d5f60
commit
87a209bf2a
1 changed files with 2 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import decimal
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import reversion
|
import reversion
|
||||||
|
@ -123,7 +124,7 @@ class Hodnoceni(bm.SeminarModelBase):
|
||||||
# TODO najít správné místo
|
# TODO najít správné místo
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def inverze_vzorecku_na_prepocet(body, resitelu):
|
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
|
@property
|
||||||
def body_celkem(self):
|
def body_celkem(self):
|
||||||
|
|
Loading…
Reference in a new issue