mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-18 21:48:16 -06:00
Remove obsolete empty_label kwarg from dynamic model choice widgets
This commit is contained in:
parent
e0a71d2978
commit
dfc58bb7e0
@ -77,7 +77,6 @@ class DynamicModelChoiceMixin:
|
|||||||
initial_params=None,
|
initial_params=None,
|
||||||
null_option=None,
|
null_option=None,
|
||||||
disabled_indicator=None,
|
disabled_indicator=None,
|
||||||
empty_label=None,
|
|
||||||
selector=False,
|
selector=False,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
@ -88,14 +87,10 @@ class DynamicModelChoiceMixin:
|
|||||||
self.disabled_indicator = disabled_indicator
|
self.disabled_indicator = disabled_indicator
|
||||||
self.selector = selector
|
self.selector = selector
|
||||||
|
|
||||||
self.empty_option = empty_label or ""
|
|
||||||
|
|
||||||
super().__init__(queryset, **kwargs)
|
super().__init__(queryset, **kwargs)
|
||||||
|
|
||||||
def widget_attrs(self, widget):
|
def widget_attrs(self, widget):
|
||||||
attrs = {
|
attrs = {}
|
||||||
'data-empty-option': self.empty_option
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set the string used to represent a null option
|
# Set the string used to represent a null option
|
||||||
if self.null_option is not None:
|
if self.null_option is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user