mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Pass row data back through again
This commit is contained in:
parent
fd8ed44833
commit
54762713f3
@ -815,13 +815,28 @@ class BomUpload(AjaxView, FormMixin):
|
||||
if not col in column_selections.values():
|
||||
missing.append(col)
|
||||
|
||||
# Re-construct the data table
|
||||
rows = []
|
||||
|
||||
for row_idx in sorted(row_data.keys()):
|
||||
row = row_data[row_idx]
|
||||
items = []
|
||||
for col_idx in sorted(row.keys()):
|
||||
value = row[col_idx]
|
||||
items.append(value)
|
||||
|
||||
rows.append({'index': row_idx, 'data': items})
|
||||
|
||||
ctx = {
|
||||
# The headers that we know about
|
||||
'req_cols': BomUploadManager.HEADERS,
|
||||
'bom_cols': headers,
|
||||
'missing': missing,
|
||||
'bom_rows': rows,
|
||||
}
|
||||
|
||||
print(ctx)
|
||||
|
||||
return self.renderJsonResponse(self.request, form=self.get_form(), data=data, context=ctx)
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
|
Loading…
Reference in New Issue
Block a user