mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 04:02:52 -06:00
Fixes #13909: Ignore empty choices when populating dynamic choice fields from initial data
This commit is contained in:
parent
8a237561ef
commit
113c60a44a
@ -43,7 +43,7 @@ class DynamicMultipleChoiceField(forms.MultipleChoiceField):
|
|||||||
|
|
||||||
if data is not None:
|
if data is not None:
|
||||||
self.choices = [
|
self.choices = [
|
||||||
choice for choice in self.choices if choice[0] in data
|
choice for choice in self.choices if choice[0] and choice[0] in data
|
||||||
]
|
]
|
||||||
|
|
||||||
return bound_field
|
return bound_field
|
||||||
|
Loading…
Reference in New Issue
Block a user