mirror of
https://github.com/inventree/InvenTree.git
synced 2025-09-18 16:41:32 +00:00
Perform model validation on API serializers
If you have a class, why not subclass it?!
This commit is contained in:
@@ -142,6 +142,8 @@ class StockItem(models.Model):
|
||||
- Quantity must be 1 if the StockItem has a serial number
|
||||
"""
|
||||
|
||||
print("Trying to clean the StockItem")
|
||||
|
||||
# The 'supplier_part' field must point to the same part!
|
||||
try:
|
||||
if self.supplier_part is not None:
|
||||
|
Reference in New Issue
Block a user