mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51:22 -06:00
Fixes #10579: Mark cable traces terminating to a provider network as complete
This commit is contained in:
parent
d3911e2a4c
commit
bd29d15814
@ -5,6 +5,7 @@
|
|||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* [#9878](https://github.com/netbox-community/netbox/issues/9878) - Fix spurious error message when rendering REST API docs
|
* [#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
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -570,6 +570,7 @@ class CablePath(models.Model):
|
|||||||
[object_to_path_node(circuit_termination)],
|
[object_to_path_node(circuit_termination)],
|
||||||
[object_to_path_node(circuit_termination.provider_network)],
|
[object_to_path_node(circuit_termination.provider_network)],
|
||||||
])
|
])
|
||||||
|
is_complete = True
|
||||||
break
|
break
|
||||||
elif circuit_termination.site and not circuit_termination.cable:
|
elif circuit_termination.site and not circuit_termination.cable:
|
||||||
# Circuit terminates to a Site
|
# Circuit terminates to a Site
|
||||||
|
@ -1323,6 +1323,7 @@ class CablePathTestCase(TestCase):
|
|||||||
is_active=True
|
is_active=True
|
||||||
)
|
)
|
||||||
self.assertEqual(CablePath.objects.count(), 1)
|
self.assertEqual(CablePath.objects.count(), 1)
|
||||||
|
self.assertTrue(CablePath.objects.first().is_complete)
|
||||||
|
|
||||||
# Delete cable 1
|
# Delete cable 1
|
||||||
cable1.delete()
|
cable1.delete()
|
||||||
|
Loading…
Reference in New Issue
Block a user