diff --git a/app/models/thread.py b/app/models/thread.py index 418c6bc..8dfaa52 100644 --- a/app/models/thread.py +++ b/app/models/thread.py @@ -9,7 +9,8 @@ class Thread(db.Model): id = db.Column(db.Integer, primary_key=True) # Top comment - top_comment_id = db.Column(db.Integer, db.ForeignKey('comment.id')) + top_comment_id = db.Column(db.Integer, + db.ForeignKey('comment.id', use_alter=True)) top_comment = db.relationship('Comment', foreign_keys=top_comment_id) # Post owning the thread, set only by Topic, Program, etc. In general, you