From 15722c1871a9839ee55b96e6a470da9b71bfce10 Mon Sep 17 00:00:00 2001
From: Jeremy Stretch <stretch@packetlife.net>
Date: Tue, 26 Nov 2019 16:56:11 -0500
Subject: [PATCH] Fixes #3720: Correctly indicate power feed terminations on
 cable list

---
 docs/release-notes/version-2.6.md | 1 +
 netbox/dcim/tables.py             | 8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/docs/release-notes/version-2.6.md b/docs/release-notes/version-2.6.md
index 5097e699e..5ef94ae4d 100644
--- a/docs/release-notes/version-2.6.md
+++ b/docs/release-notes/version-2.6.md
@@ -13,6 +13,7 @@
 * [#3674](https://github.com/netbox-community/netbox/issues/3674) - Include comments on PowerFeed view
 * [#3679](https://github.com/netbox-community/netbox/issues/3679) - Fix link for assigned ipaddress in interface page
 * [#3709](https://github.com/netbox-community/netbox/issues/3709) - Prevent exception when importing an invalid cable definition
+* [#3720](https://github.com/netbox-community/netbox/issues/3720) - Correctly indicate power feed terminations on cable list
 
 # v2.6.7 (2019-11-01)
 
diff --git a/netbox/dcim/tables.py b/netbox/dcim/tables.py
index 70a9aa5c8..9b3b405aa 100644
--- a/netbox/dcim/tables.py
+++ b/netbox/dcim/tables.py
@@ -181,8 +181,10 @@ VIRTUALCHASSIS_ACTIONS = """
 CABLE_TERMINATION_PARENT = """
 {% if value.device %}
     <a href="{{ value.device.get_absolute_url }}">{{ value.device }}</a>
-{% else %}
+{% elif value.circuit %}
     <a href="{{ value.circuit.get_absolute_url }}">{{ value.circuit }}</a>
+{% elif value.power_panel %}
+    <a href="{{ value.power_panel.get_absolute_url }}">{{ value.power_panel }}</a>
 {% endif %}
 """
 
@@ -718,7 +720,7 @@ class CableTable(BaseTable):
         orderable=False,
         verbose_name='Termination A'
     )
-    termination_a = tables.Column(
+    termination_a = tables.LinkColumn(
         accessor=Accessor('termination_a'),
         orderable=False,
         verbose_name=''
@@ -729,7 +731,7 @@ class CableTable(BaseTable):
         orderable=False,
         verbose_name='Termination B'
     )
-    termination_b = tables.Column(
+    termination_b = tables.LinkColumn(
         accessor=Accessor('termination_b'),
         orderable=False,
         verbose_name=''