From 977ece0aa8fd4fb9ef9c0d77779a09cd3d2dc427 Mon Sep 17 00:00:00 2001 From: Peter Eckel Date: Thu, 19 Oct 2023 18:30:43 +0200 Subject: [PATCH] Fixed "LabelTooLong" exception in record forms --- netbox_dns/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netbox_dns/models.py b/netbox_dns/models.py index ccb05f59..1f1617de 100644 --- a/netbox_dns/models.py +++ b/netbox_dns/models.py @@ -786,6 +786,8 @@ def __str__(self): ) except dns_name.IDNAException: name = self.name + except dns_name.LabelTooLong as exc: + name = f'{self.name[:59]}...' return f"{name} [{self.type}]"