fix: nekonečné desetiné rozvoje
This commit is contained in:
		
							parent
							
								
									87a209bf2a
								
							
						
					
					
						commit
						0c7a411c1f
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -123,8 +123,8 @@ class Hodnoceni(bm.SeminarModelBase): | |||
| 
 | ||||
| 	# TODO najít správné místo | ||||
| 	@staticmethod | ||||
| 	def inverze_vzorecku_na_prepocet(body, resitelu): | ||||
| 		return decimal.Context(prec=1).create_decimal_from_float(body * (resitelu + 2) / 3) | ||||
| 	def inverze_vzorecku_na_prepocet(body: decimal.Decimal, resitelu) -> decimal.Decimal: | ||||
| 		return round(body * (resitelu + 2) / 3, 1) | ||||
| 
 | ||||
| 	@property | ||||
| 	def body_celkem(self): | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue