mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 20:45:44 +00:00
Updates for stock allocation form
- Data submission - Nested error handling - Button callbacks to remove rows
This commit is contained in:
@ -154,6 +154,13 @@ class BuildAllocationItemSerializer(serializers.Serializer):
|
||||
required=True
|
||||
)
|
||||
|
||||
def validate_quantity(self, quantity):
|
||||
|
||||
if quantity <= 0:
|
||||
raise ValidationError(_("Quantity must be greater than zero"))
|
||||
|
||||
return quantity
|
||||
|
||||
output = serializers.PrimaryKeyRelatedField(
|
||||
queryset=StockItem.objects.filter(is_building=True),
|
||||
many=False,
|
||||
|
Reference in New Issue
Block a user