Enforce proper formatting for 'quantity' field when importing BOM data
This commit is contained in:
parent
1cc8fd28c0
commit
adfa289e9b
|
|
@ -960,6 +960,9 @@ class BomExtractSerializer(serializers.Serializer):
|
|||
"""
|
||||
quantity = self.find_matching_data(row, 'quantity', self.dataset.headers)
|
||||
|
||||
# Ensure quantity field is provided
|
||||
row['quantity'] = quantity
|
||||
|
||||
if quantity is None:
|
||||
row_error['quantity'] = _('Quantity not provided')
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue