Closes #2844: Correct display of far cable end for pass-through ports

This commit is contained in:
Jeremy Stretch 2019-02-01 09:12:48 -05:00
parent 2f1018c742
commit 69a5d3644a
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,11 @@
v2.5.6 (FUTURE)
## Bug Fixes
* [#2844](https://github.com/digitalocean/netbox/issues/2844) - Correct display of far cable end for pass-through ports
---
v2.5.5 (2019-01-31)
## Enhancements

View File

@ -169,9 +169,9 @@ class CableTermination(models.Model):
def get_cable_peer(self):
if self.cable is None:
return None
if self._cabled_as_a:
if self._cabled_as_a.exists():
return self.cable.termination_b
if self._cabled_as_b:
if self._cabled_as_b.exists():
return self.cable.termination_a