From c01c862b84b9295e98199fcf80b886361d5f3191 Mon Sep 17 00:00:00 2001 From: Sander Steffann Date: Thu, 16 Apr 2020 15:35:28 +0200 Subject: [PATCH] Make template a bit nicer --- .../netbox_ddns/ipaddress/dns_info.html | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/netbox_ddns/templates/netbox_ddns/ipaddress/dns_info.html b/netbox_ddns/templates/netbox_ddns/ipaddress/dns_info.html index 3b8c101..55062f6 100644 --- a/netbox_ddns/templates/netbox_ddns/ipaddress/dns_info.html +++ b/netbox_ddns/templates/netbox_ddns/ipaddress/dns_info.html @@ -14,15 +14,24 @@ Forward DNS - {{ object.dnsstatus.get_forward_action_display }}: - {{ object.dnsstatus.get_forward_rcode_display }} + {% if object.dnsstatus.forward_action is not None %} + {{ object.dnsstatus.get_forward_action_display }}: + {{ object.dnsstatus.get_forward_rcode_display }} + {% else %} + Not created + {% endif %} Reverse DNS - {{ object.dnsstatus.get_reverse_action_display }}: - {{ object.dnsstatus.get_reverse_rcode_display }} + {% if object.dnsstatus.reverse_action is not None %} + {{ object.dnsstatus.get_reverse_action_display }}: + {{ object.dnsstatus.get_reverse_rcode_display }} + {% else %} + Not created + {% endif %} +