#10460: Fix PowerFeed details

This commit is contained in:
jeremystretch 2022-10-04 14:36:14 -04:00
parent eef5cefb5d
commit 53f5f46037

View File

@ -41,8 +41,8 @@
<tr> <tr>
<th scope="row">Connected Device</th> <th scope="row">Connected Device</th>
<td> <td>
{% if object.connected_endpoint %} {% if object.connected_endpoints %}
{{ object.connected_endpoint.device|linkify }} ({{ object.connected_endpoint }}) {{ object.connected_endpoints.0.device|linkify }} ({{ object.connected_endpoints.0|linkify:"name" }})
{% else %} {% else %}
{{ ''|placeholder }} {{ ''|placeholder }}
{% endif %} {% endif %}
@ -50,7 +50,7 @@
</tr> </tr>
<tr> <tr>
<th scope="row">Utilization (Allocated)</th> <th scope="row">Utilization (Allocated)</th>
{% with utilization=object.connected_endpoint.get_power_draw %} {% with utilization=object.connected_endpoints.0.get_power_draw %}
{% if utilization %} {% if utilization %}
<td> <td>
{{ utilization.allocated }}VA / {{ object.available_power }}VA {{ utilization.allocated }}VA / {{ object.available_power }}VA