From e6841f6134ae75c19b150882012a7db75d0a5a8b Mon Sep 17 00:00:00 2001 From: Helium Monitor <94033432+HeliumMonitor@users.noreply.github.com> Date: Thu, 9 Dec 2021 04:34:42 +0000 Subject: [PATCH] Fix typo in models.py Change `Chile` to `Child` to fix typo. Fix Issue #1 --- app/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)