Просмотр исходного кода

Fixes #2691: Cable trace should follow circuits

Jeremy Stretch 7 лет назад
Родитель
Сommit
2f1db2fdf3
3 измененных файлов с 3 добавлено и 2 удалено
  1. 1 0
      CHANGELOG.md
  2. 1 1
      netbox/dcim/api/views.py
  3. 1 1
      netbox/dcim/models.py

+ 1 - 0
CHANGELOG.md

@@ -6,6 +6,7 @@ v2.5.2 (FUTURE)
 
 ## Bug Fixes
 
+* [#2691](https://github.com/digitalocean/netbox/issues/2691) - Cable trace should follow circuits
 * [#2698](https://github.com/digitalocean/netbox/issues/2698) - Remove pagination restriction on bulk component creation for devices/VMs
 * [#2707](https://github.com/digitalocean/netbox/issues/2707) - Correct permission evaluation for circuit termination cabling
 

+ 1 - 1
netbox/dcim/api/views.py

@@ -60,7 +60,7 @@ class CableTraceMixin(object):
         # Initialize the path array
         path = []
 
-        for near_end, cable, far_end in obj.trace():
+        for near_end, cable, far_end in obj.trace(follow_circuits=True):
 
             # Serialize each object
             serializer_a = get_serializer_for_model(near_end, prefix='Nested')

+ 1 - 1
netbox/dcim/models.py

@@ -140,7 +140,7 @@ class CableTermination(models.Model):
         if peer_port is None:
             return path
 
-        next_segment = peer_port.trace(position)
+        next_segment = peer_port.trace(position, follow_circuits)
         if next_segment is None:
             return path + [(peer_port, None, None)]