From 0a8836b12d28033e593dbaf97142103a5df42f78 Mon Sep 17 00:00:00 2001 From: TriHard Date: Thu, 15 Feb 2024 16:14:30 -0700 Subject: [PATCH] Fix sqlalchemy.exc.ArgumentError --- files/classes/comment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index 156d7fef2..ac2a7e785 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -225,7 +225,7 @@ class Comment(Base): post: Mapped["Post"] = relationship(back_populates="comments") author: Mapped["User"] = relationship(primaryjoin="User.id==Comment.author_id") senttouser: Mapped["User"] = relationship(primaryjoin="User.id==Comment.sentto") - parent_comment: Mapped["Comment"] = relationship(remote_side=[id]) + parent_comment: Mapped["Comment"] = relationship(remote_side="Comment.id") awards: Mapped[list["AwardRelationship"]] = relationship(order_by="AwardRelationship.awarded_utc.desc()", back_populates="comment") reports: Mapped[list["CommentReport"]] = relationship(order_by="CommentReport.created_utc") options: Mapped[list["CommentOption"]] = relationship(order_by="CommentOption.id")