1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #3905: divide by zero on power feeds with low values

This commit is contained in:
Saria Hajjar
2020-01-13 15:31:35 +00:00
parent b7e78028ce
commit 32ffc1b54b
2 changed files with 4 additions and 1 deletions

View File

@ -28,6 +28,7 @@
* [#3872](https://github.com/netbox-community/netbox/issues/3872) - Paginate related IPs of an address * [#3872](https://github.com/netbox-community/netbox/issues/3872) - Paginate related IPs of an address
* [#3876](https://github.com/netbox-community/netbox/issues/3876) - Fixed min/max to ASN input field at the site creation page * [#3876](https://github.com/netbox-community/netbox/issues/3876) - Fixed min/max to ASN input field at the site creation page
* [#3882](https://github.com/netbox-community/netbox/issues/3882) - Fix filtering of devices by rack group * [#3882](https://github.com/netbox-community/netbox/issues/3882) - Fix filtering of devices by rack group
* [#3905](https://github.com/netbox-community/netbox/issues/3905) - Fix divide-by-zero on power feeds with low power values
--- ---

View File

@ -112,7 +112,9 @@
{% if utilization %} {% if utilization %}
<td> <td>
{{ utilization.allocated }}VA / {{ powerfeed.available_power }}VA {{ utilization.allocated }}VA / {{ powerfeed.available_power }}VA
{% utilization_graph utilization.allocated|percentage:powerfeed.available_power %} {% if powerfeed.available_power > 0 %}
{% utilization_graph utilization.allocated|percentage:powerfeed.available_power %}
{% endif %}
</td> </td>
{% else %} {% else %}
<td class="text-muted">N/A</td> <td class="text-muted">N/A</td>