diff --git a/src/wagtail_personalisation/rules.py b/src/wagtail_personalisation/rules.py index e30f589f..ddd56567 100644 --- a/src/wagtail_personalisation/rules.py +++ b/src/wagtail_personalisation/rules.py @@ -66,7 +66,7 @@ def description(self): 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