Skip to content

Commit

Permalink
Actually working dirty fix for division by 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Arne-Weber committed Jun 7, 2024
1 parent 54f889d commit e80fab9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ def progress(self) -> float:
if self.required_minutes: # Quick fix to prevent division by zero crash
return self.current_minutes / self.required_minutes
else:
return "!!!required_minutes = 0 This could be due to a subscription requirement, tracked in Issue #101!!!"
self._manager.print(f'!!!required_minutes for "{self.name}" is 0 This could be due to a subscription requirement, tracked in Issue #101!!!')
self.preconditions_met = False
return 0

def _on_claim(self) -> None:
result = super()._on_claim()
Expand Down

0 comments on commit e80fab9

Please sign in to comment.