forked from CGM_Public/pretix_original
Fix ZeroDivisionError
This commit is contained in:
@@ -52,7 +52,8 @@ class CheckinList(LoggedModel):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def percent(self):
|
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
|
@property
|
||||||
def position_count(self):
|
def position_count(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user