From e0aa2c33e9487b61f849ee036d01aba0729560e6 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 31 Jan 2018 10:03:05 -0500 Subject: [PATCH] Fixes #1850: Fix TypeError when attempting IP address import if only unnamed devices exist --- netbox/utilities/templatetags/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/utilities/templatetags/helpers.py b/netbox/utilities/templatetags/helpers.py index 2af936885..4ed1aeced 100644 --- a/netbox/utilities/templatetags/helpers.py +++ b/netbox/utilities/templatetags/helpers.py @@ -111,7 +111,7 @@ def example_choices(field, arg=3): if len(examples) == arg: examples.append('etc.') break - if not id: + if not id or not label: continue examples.append(label) return ', '.join(examples) or 'None'