Further work on power feed modeling

This commit is contained in:
Jeremy Stretch
2019-03-21 17:47:43 -04:00
parent 705f82e416
commit 681e20133a
10 changed files with 282 additions and 39 deletions

View File

@@ -541,7 +541,7 @@ class TopologyMap(models.Model):
from dcim.models import PowerPort
# Add all power connections to the graph
for pp in PowerPort.objects.filter(device__in=devices, connected_endpoint__device__in=devices):
for pp in PowerPort.objects.filter(device__in=devices, _connected_poweroutlet__device__in=devices):
style = 'solid' if pp.connection_status == CONNECTION_STATUS_CONNECTED else 'dashed'
self.graph.edge(pp.connected_endpoint.device.name, pp.device.name, style=style)