diff --git a/netbox/dcim/tables/power.py b/netbox/dcim/tables/power.py index 04aa9a2d6..40a58ad81 100644 --- a/netbox/dcim/tables/power.py +++ b/netbox/dcim/tables/power.py @@ -87,8 +87,9 @@ class PowerFeedTable(TenancyColumnsMixin, CableTerminationTable): linkify=True, verbose_name=_('Tenant') ) - site = tables.TemplateColumn( - template_code='''{% if record.rack %}{{ record.rack.site|linkify }}{% else %}—{% endif %}''', + site = tables.Column( + accessor='rack__site', + linkify=True, verbose_name=_('Site'), ) comments = columns.MarkdownColumn(