Skip to content

Commit

Permalink
Change lookups to new related names in POEPort
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Mar 3, 2023
1 parent 88e498d commit ecfb969
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/nav/models/manage.py
Expand Up @@ -2866,7 +2866,7 @@ def get_graph_url(self, time_frame='1day'):
return get_simple_graph_url([metric], time_frame=time_frame)

def get_active_ports(self):
return self.poeport_set.filter(
return self.poe_ports.filter(
admin_enable=True, detection_status=POEPort.STATUS_DELIVERING_POWER
)

Expand Down
2 changes: 1 addition & 1 deletion python/nav/web/templates/ipdevinfo/poegroup-details.html
Expand Up @@ -62,7 +62,7 @@
</tr>
</thead>
<tbody>
{% for port in poegroup.poeport_set.all %}
{% for port in poegroup.poe_ports.all %}
<tr>
<td>
{% if port.interface %}
Expand Down
Expand Up @@ -56,8 +56,8 @@
<td>{{ port.ifphysaddress|default:"N/A"|upper }}</td>
</tr>

{% if port.poeport_set.exists %}
{%with port.poeport_set.first as poeport %}
{% if port.poe_ports.exists %}
{%with port.poe_ports.first as poeport %}
<tr>
<th>PoE Status</th>
<td>
Expand Down

0 comments on commit ecfb969

Please sign in to comment.