-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Divide by zero error with very low power feed values #3905
Comments
|
@jeremystretch Yeah, I just tried to recreate this with a new database and it doesn't occur. Let me see what I did differently. |
@jeremystretch updated the steps. |
Fixes #3905: divide by zero on power feeds with low values
@jeremystretch so I found out that this is also happening on the devices view (assign one of the power ports to a power feed. Shall I just keep chasing those down with if conditions or just change the percentage filter to return 0 if the denominator is 0?
|
@hSaria Let's try to catch all the occurrences. IMO I think I'd rather know when we're dividing by zero than suppress the error. |
Environment
Steps to Reproduce
Expected Behavior
Page loads
Observed Behavior
ZeroDivisionError
exception because the percentage calculation is usingavailable_power
which was rounded to 0 withThe text was updated successfully, but these errors were encountered: