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:
@@ -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',
|
||||
]
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user