mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Fixes #1274: Exclude unterminated circuits from topology maps
This commit is contained in:
parent
a16218b311
commit
9b082eea14
@ -371,7 +371,8 @@ class TopologyMap(models.Model):
|
||||
# Add all circuits to the graph
|
||||
for termination in CircuitTermination.objects.filter(term_side='A', interface__device__in=devices):
|
||||
peer_termination = termination.get_peer_termination()
|
||||
if peer_termination is not None and peer_termination.interface.device in devices:
|
||||
if (peer_termination is not None and peer_termination.interface is not None and
|
||||
peer_termination.interface.device in devices):
|
||||
graph.edge(termination.interface.device.name, peer_termination.interface.device.name, color='blue')
|
||||
|
||||
return graph.pipe(format=img_format)
|
||||
|
Loading…
Reference in New Issue
Block a user