瀏覽代碼

Fix trace() loop

jeremystretch 3 年之前
父節點
當前提交
11707cb3b1
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      netbox/dcim/models/device_components.py

+ 2 - 0
netbox/dcim/models/device_components.py

@@ -215,6 +215,8 @@ class PathEndpoint(models.Model):
             destinations = origin._path.destinations
             if len(destinations) == 1:
                 origin = getattr(destinations[0], 'bridge', None)
+            else:
+                origin = None
 
         # Return the path as a list of three-tuples (A termination(s), cable(s), B termination(s))
         return list(zip(*[iter(path)] * 3))