Skip to content

Commit

Permalink
Fixes #10579: Mark cable traces terminating to a provider network as …
Browse files Browse the repository at this point in the history
…complete
  • Loading branch information
jeremystretch committed Nov 17, 2022
1 parent d3911e2 commit bd29d15
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/release-notes/version-3.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

---

Expand Down
1 change: 1 addition & 0 deletions netbox/dcim/models/cables.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ def from_origin(cls, terminations):
[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
Expand Down
1 change: 1 addition & 0 deletions netbox/dcim/tests/test_cablepaths.py
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,7 @@ def test_214_interface_to_providernetwork_via_circuit(self):
is_active=True
)
self.assertEqual(CablePath.objects.count(), 1)
self.assertTrue(CablePath.objects.first().is_complete)

# Delete cable 1
cable1.delete()
Expand Down

0 comments on commit bd29d15

Please sign in to comment.