mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-21 11:37:21 -06:00
Fixes #577: Correct initialization of custom boolean fields
This commit is contained in:
parent
bdb8d62cef
commit
796b131f73
@ -30,8 +30,8 @@ def get_custom_fields_for_model(content_type, filterable_only=False, bulk_edit=F
|
|||||||
elif cf.type == CF_TYPE_BOOLEAN:
|
elif cf.type == CF_TYPE_BOOLEAN:
|
||||||
choices = (
|
choices = (
|
||||||
(None, '---------'),
|
(None, '---------'),
|
||||||
(1, 'True'),
|
(True, 'True'),
|
||||||
(0, 'False'),
|
(False, 'False'),
|
||||||
)
|
)
|
||||||
if cf.default.lower() in ['true', 'yes', '1']:
|
if cf.default.lower() in ['true', 'yes', '1']:
|
||||||
initial = True
|
initial = True
|
||||||
|
Loading…
Reference in New Issue
Block a user