Просмотр исходного кода

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

Jeremy Stretch 8 лет назад
Родитель
Сommit
e0aa2c33e9
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      netbox/utilities/templatetags/helpers.py

+ 1 - 1
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'