mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Suppressed '__all__' field name in BulkImportForm validation
This commit is contained in:
@ -253,6 +253,9 @@ class BulkImportForm(forms.Form):
|
|||||||
else:
|
else:
|
||||||
for field, errors in obj_form.errors.items():
|
for field, errors in obj_form.errors.items():
|
||||||
for e in errors:
|
for e in errors:
|
||||||
self.add_error('csv', "Record {} ({}): {}".format(i, field, e))
|
if field == '__all__':
|
||||||
|
self.add_error('csv', "Record {}: {}".format(i, e))
|
||||||
|
else:
|
||||||
|
self.add_error('csv', "Record {} ({}): {}".format(i, field, e))
|
||||||
|
|
||||||
self.cleaned_data['csv'] = obj_list
|
self.cleaned_data['csv'] = obj_list
|
||||||
|
Reference in New Issue
Block a user