mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-23 07:56:44 -06:00
Fix data source type choices during bulk edit
This commit is contained in:
parent
ec098da4b9
commit
9902e2c36d
@ -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,
|
||||
|
@ -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()
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user