From f80b11630761fb79e4f119e6b742a5231f251e50 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 08:50:35 +1000 Subject: [PATCH] Catch potential missing element (#7059) (#7060) (cherry picked from commit c823f1420a746a041e1d17530e1dd760ede3fbd2) Co-authored-by: Oliver --- InvenTree/common/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/common/views.py b/InvenTree/common/views.py index 3d9cd53c22..8f1fbe0e40 100644 --- a/InvenTree/common/views.py +++ b/InvenTree/common/views.py @@ -269,7 +269,7 @@ class FileManagementFormView(MultiStepFormView): for idx, item in row_data.items(): column_data = { 'name': self.column_names[idx], - 'guess': self.column_selections[idx], + 'guess': self.column_selections.get(idx, ''), } cell_data = {'cell': item, 'idx': idx, 'column': column_data}