mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
11048 fix connected_endpoint refs
This commit is contained in:
@@ -189,7 +189,7 @@ class PathEndpoint(models.Model):
|
||||
dcim.signals in response to changes in the cable path, and complements the `origin` GenericForeignKey field on the
|
||||
CablePath model. `_path` should not be accessed directly; rather, use the `path` property.
|
||||
|
||||
`connected_endpoint()` is a convenience method for returning the destination of the associated CablePath, if any.
|
||||
`connected_endpoints()` is a convenience method for returning the destination of the associated CablePath, if any.
|
||||
"""
|
||||
_path = models.ForeignKey(
|
||||
to='dcim.CablePath',
|
||||
|
@@ -210,7 +210,7 @@
|
||||
<div class="card">
|
||||
<h5 class="card-header">Wireless</h5>
|
||||
<div class="card-body">
|
||||
{% with peer=object.connected_endpoint %}
|
||||
{% with peer=object.connected_endpoints.0 %}
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@@ -173,7 +173,7 @@
|
||||
<td>{{ powerfeed|linkify }}</td>
|
||||
<td>{% badge powerfeed.get_status_display bg_color=powerfeed.get_status_color %}</td>
|
||||
<td>{% badge powerfeed.get_type_display bg_color=powerfeed.get_type_color %}</td>
|
||||
{% with power_port=powerfeed.connected_endpoint %}
|
||||
{% with power_port=powerfeed.connected_endpoints.0 %}
|
||||
{% if power_port %}
|
||||
<td>{% utilization_graph power_port.get_power_draw.allocated|percentage:powerfeed.available_power %}</td>
|
||||
{% else %}
|
||||
|
Reference in New Issue
Block a user