mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-15 03:23:07 +00:00
* Catch IndexError when importing data * Also handle TypeError (cherry picked from commit 93e4dadb49b1cbe304ed9654af8f9d1d944c112e) Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
parent
3b238fdbba
commit
b8e726d8a4
@ -168,7 +168,11 @@ class PartImport(FileManagementFormView):
|
|||||||
for row in self.rows:
|
for row in self.rows:
|
||||||
# check each submitted column
|
# check each submitted column
|
||||||
for idx in col_ids:
|
for idx in col_ids:
|
||||||
|
|
||||||
|
try:
|
||||||
data = row['data'][col_ids[idx]]['cell']
|
data = row['data'][col_ids[idx]]['cell']
|
||||||
|
except (IndexError, TypeError):
|
||||||
|
continue
|
||||||
|
|
||||||
if idx in self.file_manager.OPTIONAL_MATCH_HEADERS:
|
if idx in self.file_manager.OPTIONAL_MATCH_HEADERS:
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user