changed recipe ingredient relation

This commit is contained in:
vabene1111
2020-06-25 21:45:16 +02:00
parent df912b8865
commit bda38f0647
6 changed files with 50 additions and 6 deletions

View File

@ -165,7 +165,6 @@ class Food(models.Model):
class Ingredient(models.Model):
recipe = models.ForeignKey(Recipe, on_delete=models.CASCADE)
food = models.ForeignKey(Food, on_delete=models.PROTECT)
unit = models.ForeignKey(Unit, on_delete=models.PROTECT)
amount = models.DecimalField(default=0, decimal_places=16, max_digits=32)