소스 검색

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

Jeremy Stretch 8 년 전
부모
커밋
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:
         if len(examples) == arg:
             examples.append('etc.')
             examples.append('etc.')
             break
             break
-        if not id:
+        if not id or not label:
             continue
             continue
         examples.append(label)
         examples.append(label)
     return ', '.join(examples) or 'None'
     return ', '.join(examples) or 'None'