diff --git a/netbox/core/forms/bulk_edit.py b/netbox/core/forms/bulk_edit.py index 5ebb2ec87..8c7354d84 100644 --- a/netbox/core/forms/bulk_edit.py +++ b/netbox/core/forms/bulk_edit.py @@ -15,10 +15,8 @@ __all__ = ( class DataSourceBulkEditForm(NetBoxModelBulkEditForm): type = forms.ChoiceField( label=_('Type'), - # TODO: Field value should be empty on init (needs add_blank_choice()) choices=get_data_backend_choices, - required=False, - initial='' + required=False ) enabled = forms.NullBooleanField( required=False, diff --git a/netbox/core/utils.py b/netbox/core/utils.py index 7f54738d1..f27d1b5f7 100644 --- a/netbox/core/utils.py +++ b/netbox/core/utils.py @@ -8,7 +8,10 @@ __all__ = ( def get_data_backend_choices(): return [ - (name, cls.label) for name, cls in registry['data_backends'].items() + (None, '---------'), + *[ + (name, cls.label) for name, cls in registry['data_backends'].items() + ] ]