ソースを参照

Fixes #11723: Circuit terminations should link to their associated circuits (rather than site or provider network)

jeremystretch 3 年 前
コミット
afc752b4ce
2 ファイル変更3 行追加4 行削除
  1. 1 0
      docs/release-notes/version-3.4.md
  2. 2 4
      netbox/circuits/models/circuits.py

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

@@ -18,6 +18,7 @@
 * [#11601](https://github.com/netbox-community/netbox/issues/11601) - Fix partial matching of start/end addresses for IP range search
 * [#11683](https://github.com/netbox-community/netbox/issues/11683) - Fix CSV header attribute detection when auto-detecting import format
 * [#11711](https://github.com/netbox-community/netbox/issues/11711) - Fix CSV import for multiple-object custom fields
+* [#11723](https://github.com/netbox-community/netbox/issues/11723) - Circuit terminations should link to their associated circuits (rather than site or provider network)
 
 ---
 

+ 2 - 4
netbox/circuits/models/circuits.py

@@ -196,12 +196,10 @@ class CircuitTermination(
         )
 
     def __str__(self):
-        return f'Termination {self.term_side}: {self.site or self.provider_network}'
+        return f'{self.circuit}: Termination {self.term_side}'
 
     def get_absolute_url(self):
-        if self.site:
-            return self.site.get_absolute_url()
-        return self.provider_network.get_absolute_url()
+        return self.circuit.get_absolute_url()
 
     def clean(self):
         super().clean()