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

Fixes #10579: Mark cable traces terminating to a provider network as complete

jeremystretch 3 лет назад
Родитель
Сommit
bd29d15814

+ 1 - 0
docs/release-notes/version-3.3.md

@@ -5,6 +5,7 @@
 ### Bug Fixes
 
 * [#9878](https://github.com/netbox-community/netbox/issues/9878) - Fix spurious error message when rendering REST API docs
+* [#10579](https://github.com/netbox-community/netbox/issues/10579) - Mark cable traces terminating to a provider network as complete
 
 ---
 

+ 1 - 0
netbox/dcim/models/cables.py

@@ -570,6 +570,7 @@ class CablePath(models.Model):
                         [object_to_path_node(circuit_termination)],
                         [object_to_path_node(circuit_termination.provider_network)],
                     ])
+                    is_complete = True
                     break
                 elif circuit_termination.site and not circuit_termination.cable:
                     # Circuit terminates to a Site

+ 1 - 0
netbox/dcim/tests/test_cablepaths.py

@@ -1323,6 +1323,7 @@ class CablePathTestCase(TestCase):
             is_active=True
         )
         self.assertEqual(CablePath.objects.count(), 1)
+        self.assertTrue(CablePath.objects.first().is_complete)
 
         # Delete cable 1
         cable1.delete()