1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #6910: Fix exception on invalid CSV import column name

This commit is contained in:
jeremystretch
2021-08-09 09:20:22 -04:00
parent a8b6902829
commit 7bcebd5b0f
2 changed files with 2 additions and 1 deletions

View File

@@ -675,7 +675,7 @@ class BulkImportView(GetReturnURLMixin, ObjectPermissionRequiredMixin, View):
)
def clean(self):
csv_rows = self.cleaned_data['csv'][1]
csv_rows = self.cleaned_data['csv'][1] if 'csv' in self.cleaned_data else None
csv_file = self.files.get('csv_file')
# Check that the user has not submitted both text data and a file