Explorar o código

Fix trace() loop

jeremystretch %!s(int64=3) %!d(string=hai) anos
pai
achega
11707cb3b1
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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
             destinations = origin._path.destinations
             if len(destinations) == 1:
             if len(destinations) == 1:
                 origin = getattr(destinations[0], 'bridge', None)
                 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 the path as a list of three-tuples (A termination(s), cable(s), B termination(s))
         return list(zip(*[iter(path)] * 3))
         return list(zip(*[iter(path)] * 3))