Truncate real percentage to 1st decimal

This commit is contained in:
Gabriel Augendre 2019-06-23 16:12:36 +02:00
parent 2c499addfa
commit e271653284
1 changed files with 1 additions and 1 deletions

View File

@ -173,4 +173,4 @@ class Round(models.Model):
.order_by("-date")
.first()
)
return self.chosen_weight / theoretical_max.value * 100
return int(self.chosen_weight / theoretical_max.value * 1000) / 10