use back_populates instead of backref
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2022-02-13 21:30:13 +01:00
parent 8a482b83e9
commit cc8164ef4c

View File

@ -12,4 +12,4 @@ class Meal(db.Model):
spicy = db.Column(db.Boolean, nullable=True, default=False) spicy = db.Column(db.Boolean, nullable=True, default=False)
vegan = 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) glutenfree = db.Column(db.Boolean, nullable=True, default=False)
ingredients = db.relationship('Ingredient', backref='Meal', lazy='dynamic') ingredients = db.relationship('Ingredient', back_populates='Meal', lazy='dynamic')