From 796b131f73c19a795e4ddb709742be835dda88de Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 27 Sep 2016 13:42:10 -0400 Subject: [PATCH] Fixes #577: Correct initialization of custom boolean fields --- netbox/extras/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/extras/forms.py b/netbox/extras/forms.py index 3d14cd000..6a863be2f 100644 --- a/netbox/extras/forms.py +++ b/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