diff --git a/app/models.py b/app/models.py index ddf2b03..95336c4 100644 --- a/app/models.py +++ b/app/models.py @@ -55,7 +55,7 @@ class Parent(TimestampMixin, db.Model): profession_id = db.Column(db.Integer, db.ForeignKey('profession.id')) # How to reference a many-to-many table # variable = (Model, secondary = variable storing M:M, backref = name when reversed (attribute for children)) - children = db.relationship("Chile", secondary=many_to_many_table, backref=db.backref("parents",lazy=True),lazy="subquery") + children = db.relationship("Child", secondary=many_to_many_table, backref=db.backref("parents",lazy=True),lazy="subquery") def __repr__(self): return ''.format(self.name) @@ -66,4 +66,4 @@ class Child(TimestampMixin, db.Model): name = db.Column(db.String(15)) def __repr__(self): - return ''.format(self.name) \ No newline at end of file + return ''.format(self.name)