Almost broke the universe
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user