From 3f40e15ed5612b0567e0987b43e7e0f93447df7d Mon Sep 17 00:00:00 2001 From: atownson <52260120+atownson@users.noreply.github.com> Date: Thu, 18 Aug 2022 16:18:29 -0500 Subject: [PATCH] netbox-community#10055 - Add template for NAT Outside Fixes 'ipam.IPAddress.None' text --- netbox/ipam/tables/ip.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/netbox/ipam/tables/ip.py b/netbox/ipam/tables/ip.py index 20e63fe55..493488dac 100644 --- a/netbox/ipam/tables/ip.py +++ b/netbox/ipam/tables/ip.py @@ -56,6 +56,12 @@ VRF_LINK = """ {% endif %} """ +NAT_OUTSIDE_LINK = """ +{% if record.nat_outside.count > 0 %} + {% for nat in record.nat_outside.all %}{{ nat.address.ip }}{% if not forloop.last %}, {% endif %}{% endfor %} +{% endif %} +""" + # # RIRs @@ -360,8 +366,8 @@ class IPAddressTable(TenancyColumnsMixin, NetBoxTable): orderable=False, verbose_name='NAT (Inside)' ) - nat_outside = tables.Column( - linkify=True, + nat_outside = tables.TemplateColumn( + template_code=NAT_OUTSIDE_LINK, orderable=False, verbose_name='NAT (Outside)' )