From 1a0b2b6813d1d9201b6e67e1cc82ad2363eeb7b1 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 2 Jul 2022 08:51:19 +0200 Subject: [PATCH] fix 500 errors --- files/classes/comment.py | 2 +- files/routes/votes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index 3ff769163..c3f330881 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -81,7 +81,7 @@ class Comment(Base): author = relationship("User", primaryjoin="User.id==Comment.author_id") senttouser = relationship("User", primaryjoin="User.id==Comment.sentto") parent_comment = relationship("Comment", remote_side=[id], back_populates="child_comments") - child_comments = relationship("Comment", remote_side=[parent_comment_id], back_populates="parent_comment") + child_comments = relationship("Comment", lazy="dynamic" remote_side=[parent_comment_id], back_populates="parent_comment") awards = relationship("AwardRelationship", order_by="AwardRelationship.awarded_utc.desc()", back_populates="comment") flags = relationship("CommentFlag", order_by="CommentFlag.created_utc") options = relationship("CommentOption", order_by="CommentOption.id") diff --git a/files/routes/votes.py b/files/routes/votes.py index 9d67a6699..dbaa9bb71 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -6,7 +6,7 @@ from flask import * from files.__main__ import app, limiter, cache from os import environ -@app.get("/votes/") +@app.get("/votes/") @auth_required def vote_info_get(v, link): try: