mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Remove boilerplate error messages from CSV model choice fields
This commit is contained in:
@@ -500,6 +500,10 @@ class CSVModelChoiceField(forms.ModelChoiceField):
|
||||
"""
|
||||
Provides additional validation for model choices entered as CSV data.
|
||||
"""
|
||||
default_error_messages = {
|
||||
'invalid_choice': 'Object not found.',
|
||||
}
|
||||
|
||||
def to_python(self, value):
|
||||
try:
|
||||
return super().to_python(value)
|
||||
|
Reference in New Issue
Block a user