mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Add blank choice to ColorSelect widget
This commit is contained in:
@ -209,7 +209,7 @@ class ColorSelect(forms.Select):
|
|||||||
option_template_name = 'widgets/colorselect_option.html'
|
option_template_name = 'widgets/colorselect_option.html'
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
kwargs['choices'] = COLOR_CHOICES
|
kwargs['choices'] = add_blank_choice(COLOR_CHOICES)
|
||||||
super(ColorSelect, self).__init__(*args, **kwargs)
|
super(ColorSelect, self).__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user