2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-08 12:50:55 +00:00

Require certain headers to be present in the file

This commit is contained in:
Oliver Walters
2019-06-27 22:16:24 +10:00
parent 2831ac55c4
commit 65c7454124
2 changed files with 40 additions and 22 deletions

View File

@@ -44,10 +44,20 @@ class BomImportForm(HelperForm):
bom_file = forms.FileField(label='BOM file', required=True, help_text="Select BOM file to upload")
starting_row = forms.IntegerField(
required=True,
initial=2,
help_text='First row containing valid BOM data',
validators=[
MinValueValidator(1)
]
)
class Meta:
model = Part
fields = [
'bom_file',
'starting_row',
]