Fix ZeroDivisionError

This commit is contained in:
Raphael Michel
2019-09-27 09:11:03 +02:00
parent ce6e46dfd2
commit f1ec129c0a

View File

@@ -52,7 +52,8 @@ class CheckinList(LoggedModel):
@property
def percent(self):
return round(self.checkin_count * 100 / self.position_count)
pc = self.position_count
return round(self.checkin_count * 100 / pc) if pc else 0
@property
def position_count(self):