소스 검색

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

Jeremy Stretch 7 년 전
부모
커밋
69a5d3644a
2개의 변경된 파일10개의 추가작업 그리고 2개의 파일을 삭제
  1. 8 0
      CHANGELOG.md
  2. 2 2
      netbox/dcim/models.py

+ 8 - 0
CHANGELOG.md

@@ -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

+ 2 - 2
netbox/dcim/models.py

@@ -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