diff --git a/mealapi/model/ingredient.py b/mealapi/model/ingredient.py index fab64a3..6515498 100644 --- a/mealapi/model/ingredient.py +++ b/mealapi/model/ingredient.py @@ -7,4 +7,4 @@ class Ingredient(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255), nullable=False, unique=True) meal_id = db.Column(db.Integer, db.ForeignKey('Meal.id')) - meal = db.relationship('Meal', back_populates='Ingredient', lazy='dynamic') + meal = db.relationship('Meal', back_populates='ingredients', lazy='dynamic') diff --git a/mealapi/model/meal.py b/mealapi/model/meal.py index b2dfb24..14234e4 100644 --- a/mealapi/model/meal.py +++ b/mealapi/model/meal.py @@ -12,4 +12,4 @@ class Meal(db.Model): spicy = db.Column(db.Boolean, nullable=True, default=False) vegan = db.Column(db.Boolean, nullable=True, default=False) glutenfree = db.Column(db.Boolean, nullable=True, default=False) - ingredients = db.relationship('Ingredient', back_populates='Meal', lazy='dynamic') + ingredients = db.relationship('Ingredient', back_populates='meal', lazy='dynamic')