소스 검색

Fixes #577: Correct initialization of custom boolean fields

Jeremy Stretch 9 년 전
부모
커밋
796b131f73
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      netbox/extras/forms.py

+ 2 - 2
netbox/extras/forms.py

@@ -30,8 +30,8 @@ def get_custom_fields_for_model(content_type, filterable_only=False, bulk_edit=F
         elif cf.type == CF_TYPE_BOOLEAN:
             choices = (
                 (None, '---------'),
-                (1, 'True'),
-                (0, 'False'),
+                (True, 'True'),
+                (False, 'False'),
             )
             if cf.default.lower() in ['true', 'yes', '1']:
                 initial = True