mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-08 03:11:22 +00:00
Updates for stock allocation form
- Data submission - Nested error handling - Button callbacks to remove rows
This commit is contained in:
1 parent
a9d5b776d3
commit
074466f087
2 files changed
+142
-75
No files matched your search
@@ -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