2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-07 04:12:11 +00:00

db unique_together

This commit is contained in:
Oliver Walters
2017-04-16 01:24:00 +10:00
parent 4f6802b9bf
commit d0a66390f5
4 changed files with 12 additions and 48 deletions

View File

@@ -17,9 +17,7 @@ class StockLocation(InvenTreeTree):
class StockItem(models.Model):
part = models.ForeignKey(Part,
on_delete=models.CASCADE,
related_name='locations')
part = models.ForeignKey(Part, on_delete=models.CASCADE, related_name='locations')
location = models.ForeignKey(StockLocation, on_delete=models.CASCADE)
quantity = models.PositiveIntegerField()
updated = models.DateField(auto_now=True)