2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 11:05:41 +00:00

Catch IndexError when importing data (#5439)

* Catch IndexError when importing data

* Also handle TypeError
This commit is contained in:
Oliver
2023-08-14 15:21:41 +10:00
committed by GitHub
parent a8118ed406
commit 93e4dadb49

View File

@ -168,7 +168,11 @@ class PartImport(FileManagementFormView):
for row in self.rows:
# check each submitted column
for idx in col_ids:
data = row['data'][col_ids[idx]]['cell']
try:
data = row['data'][col_ids[idx]]['cell']
except (IndexError, TypeError):
continue
if idx in self.file_manager.OPTIONAL_MATCH_HEADERS:
try: