From ee582a5490793879c6f2211f1d5fc0ffa94d7ef6 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 2 Jun 2021 00:21:01 +0200 Subject: [PATCH] fixes the problem reported by @eeintech ? --- InvenTree/common/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/InvenTree/common/views.py b/InvenTree/common/views.py index bd1fb6421b..0ee8d99cf5 100644 --- a/InvenTree/common/views.py +++ b/InvenTree/common/views.py @@ -414,7 +414,11 @@ class FileManagementFormView(MultiStepFormView): 'data': data, 'errors': {}, } - self.rows.append(row) + + # make sure that the row was submitted - solves https://github.com/inventree/InvenTree/pull/1588#issuecomment-847889353 + row_exist_check = [a for a in self.request.POST.keys() if a.startswith(f'row_{int(row_idx) +1}_')] + if True in row_exist_check: + self.rows.append(row) # In the item selection step: update row data with mapping to form fields if form and self.steps.current == 'items':