From 26428e8cb83f6334a143c1a472627e8acb0dff02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sun, 13 Feb 2022 21:00:35 +0100 Subject: [PATCH] secundary --- 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 42edc6d..75b9406 100644 --- a/mealapi/model/ingredient.py +++ b/mealapi/model/ingredient.py @@ -8,4 +8,4 @@ class Ingredient(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String, nullable=False, unique=True) value = db.Column(db.String, nullable=False) - items = db.relationship('Meal', secondary=MealIngredient, back_populates='Ingredient') + items = db.relationship('Meal', secondary=MealIngredient.__tablename__, back_populates='Ingredient') diff --git a/mealapi/model/meal.py b/mealapi/model/meal.py index 93d6f3d..8b09c65 100644 --- a/mealapi/model/meal.py +++ b/mealapi/model/meal.py @@ -13,4 +13,4 @@ class Meal(db.Model): spicy = db.Column(db.Boolean, nullable=False, default=False) vegan = db.Column(db.Boolean, nullable=False, default=False) glutenfree = db.Column(db.Boolean, nullable=False, default=False) - ingredients = db.relationship('Ingredient', secondary=MealIngredient, back_populates='Meal') + ingredients = db.relationship('Ingredient', secondary=MealIngredient.__tablename__, back_populates='Meal')