2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-19 18:05:54 +00:00

style fixes

This commit is contained in:
Oliver
2021-11-03 11:33:44 +11:00
parent be7b224f14
commit 1d42d33c8e
2 changed files with 12 additions and 16 deletions

View File

@@ -277,8 +277,11 @@ class SerializeStockItemSerializer(serializers.Serializer):
)
def validate_quantity(self, quantity):
"""
Validate that the quantity value is correct
"""
item = self.context['item']
item = self.context['item']
if quantity < 0:
raise ValidationError(_("Quantity must be greater than zero"))