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

Merge pull request #3906 from hSaria/3905-powerfeed-divide-by-zero

Fixes #3905: divide by zero on power feeds with low values
This commit is contained in:
Jeremy Stretch
2020-01-13 10:32:59 -05:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -112,7 +112,9 @@
{% if utilization %}
<td>
{{ 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>
{% else %}
<td class="text-muted">N/A</td>