mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-18 13:06:30 -06:00
CSVChoiceField should default to a blank string instead of None
This commit is contained in:
parent
590bbbce7f
commit
b16be577e3
@ -432,7 +432,7 @@ class CSVChoiceField(forms.ChoiceField):
|
||||
def clean(self, value):
|
||||
value = super().clean(value)
|
||||
if not value:
|
||||
return None
|
||||
return ''
|
||||
if value not in self.choice_values:
|
||||
raise forms.ValidationError("Invalid choice: {}".format(value))
|
||||
return self.choice_values[value]
|
||||
|
Loading…
Reference in New Issue
Block a user