bug: fix a division by 0 error edge case in MinerData.

This commit is contained in:
UpstreamData
2023-02-22 12:10:53 -07:00
parent e6424acf5f
commit 59e5be280f

View File

@@ -403,6 +403,8 @@ class MinerData:
@property
def percent_ideal(self): # noqa - Skip PyCharm inspection
if self.total_chips == 0 or self.ideal_chips == 0:
return 0
return round((self.total_chips / self.ideal_chips) * 100)
@percent_ideal.setter