瀏覽代碼

Fixes #1274: Exclude unterminated circuits from topology maps

Jeremy Stretch 8 年之前
父節點
當前提交
9b082eea14
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      netbox/extras/models.py

+ 2 - 1
netbox/extras/models.py

@@ -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)