7

Almost broke the universe

This commit is contained in:
Jasper Berghoef
2017-08-25 11:36:46 +02:00
parent e78e71634e
commit bbe0d4abeb

View File

@ -66,7 +66,7 @@ class AbstractBaseRule(models.Model):
def hit_percentage(self):
percentage = round(Decimal(
(self.hit_count / self.visit_count) * 100
), 2)
), 2) if self.hit_count > 0 else 0
return '%d' % percentage
@property