7

Fix hit percentage

This commit is contained in:
Jasper Berghoef
2017-08-25 11:33:14 +02:00
parent 11dca46772
commit e78e71634e

View File

@ -64,9 +64,9 @@ class AbstractBaseRule(models.Model):
@property
def hit_percentage(self):
percentage = Decimal(
percentage = round(Decimal(
(self.hit_count / self.visit_count) * 100
).quantize(Decimal('.01'))
), 2)
return '%d' % percentage
@property