Commit b21b0f6e by Dudás Ádám

one: check share quota before division

parent e0ba77b2
...@@ -97,6 +97,7 @@ class UserCloudDetails(models.Model): ...@@ -97,6 +97,7 @@ class UserCloudDetails(models.Model):
return c return c
def get_share_pc(self): def get_share_pc(self):
assert self.share_quota > 0
return 100 * self.get_weighted_share_count() / self.share_quota return 100 * self.get_weighted_share_count() / self.share_quota
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment