diff --git a/InvenTree/part/templates/part/bom_upload/select_fields.html b/InvenTree/part/templates/part/bom_upload/select_fields.html index 6bb6223dba..e74c49691a 100644 --- a/InvenTree/part/templates/part/bom_upload/select_fields.html +++ b/InvenTree/part/templates/part/bom_upload/select_fields.html @@ -35,6 +35,7 @@ {% for req in req_cols %} {% endfor %} + {% if col.duplicate %}

Duplicate column selection

diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 9b8ca5774d..94fc00b30a 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -767,6 +767,9 @@ class BomUpload(AjaxView, FormMixin): col_id = int(item.replace('col_select_', '')) col_name = value + if value.lower() == 'delete': + continue + column_selections[col_id] = value # Extract the row data @@ -822,6 +825,10 @@ class BomUpload(AjaxView, FormMixin): row = row_data[row_idx] items = [] for col_idx in sorted(row.keys()): + + if not col_idx in column_selections.keys(): + continue + value = row[col_idx] items.append(value)