From 4150471b7540b657c7f26660cf4081f4e054d09a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sun, 13 Feb 2022 21:36:07 +0100 Subject: [PATCH] it's getting late+ --- mealapi/model/ingredient.py | 2 +- mealapi/model/meal.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mealapi/model/ingredient.py b/mealapi/model/ingredient.py index 6515498..16a2dff 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='ingredients', lazy='dynamic') + meal = db.relationship('Meal', back_populates='ingredients') diff --git a/mealapi/model/meal.py b/mealapi/model/meal.py index 92dfd83..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') + ingredients = db.relationship('Ingredient', back_populates='meal', lazy='dynamic')