-
Notifications
You must be signed in to change notification settings - Fork 81
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 when Attribute that has_usage is 0 #336
Comments
payerle
added a commit
to payerle/coldfront
that referenced
this issue
Nov 10, 2021
…s_usage=True This adds a try/except block in generate_guauge_data_from_usage() (why the misspelling?) to catch for divide by zero errors. If value=0, we set the percent used to 100% (arbitrary, but better than an exception)
aebruno
added a commit
that referenced
this issue
Dec 23, 2021
Fix for #336 - Divide-by-zero error for Attrib value=0 and has_usage
Fixed in PR #337 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If one has an AllocationAttribute of a type which has_usage and that attribute is set to 0, the allocation page will raise divide by zero exceptions. The web pages should not crash.
The text was updated successfully, but these errors were encountered: