1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #1850: Fix TypeError when attempting IP address import if only unnamed devices exist

This commit is contained in:
Jeremy Stretch
2018-01-31 10:03:05 -05:00
parent 49f268a14c
commit e0aa2c33e9

View File

@ -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'