Almost broke the universe
This commit is contained in:
@ -66,7 +66,7 @@ class AbstractBaseRule(models.Model):
|
|||||||
def hit_percentage(self):
|
def hit_percentage(self):
|
||||||
percentage = round(Decimal(
|
percentage = round(Decimal(
|
||||||
(self.hit_count / self.visit_count) * 100
|
(self.hit_count / self.visit_count) * 100
|
||||||
), 2)
|
), 2) if self.hit_count > 0 else 0
|
||||||
return '%d' % percentage
|
return '%d' % percentage
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Reference in New Issue
Block a user