mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-15 07:12:16 +00:00
Workaround for zero key situtations
This commit is contained in:
@@ -53,7 +53,11 @@ class EVEPlayerCorporation(EVEAPIModel):
|
|||||||
membercount = self.eveplayercharacter_set.count()
|
membercount = self.eveplayercharacter_set.count()
|
||||||
else:
|
else:
|
||||||
membercount = self.member_count
|
membercount = self.member_count
|
||||||
return (float(self.api_keys) / membercount) * 100
|
|
||||||
|
if len(self.api_keys) and membercount:
|
||||||
|
return (float(self.api_keys) / membercount) * 100
|
||||||
|
else:
|
||||||
|
return float(0.0)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def average_sp(self):
|
def average_sp(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user