fixed ingredient dropping on parser fail

This commit is contained in:
vabene1111
2021-01-07 22:56:05 +01:00
parent e9f2b875b9
commit 78fa5338d3
3 changed files with 5 additions and 3 deletions

View File

@ -146,7 +146,7 @@ class Unit(models.Model):
class Food(models.Model):
name = models.CharField(unique=True, max_length=128)
name = models.CharField(unique=True, max_length=128, validators=[MinLengthValidator(1)])
recipe = models.ForeignKey('Recipe', null=True, blank=True, on_delete=models.SET_NULL)
def __str__(self):