From 9ffc3015e21ba66f4f7c6f308831f76a333a8042 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 1 Jul 2022 20:09:56 +0200 Subject: [PATCH] testing --- files/helpers/get.py | 4 ++-- files/routes/posts.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/helpers/get.py b/files/helpers/get.py index 5d7747c9d..d294d35fb 100644 --- a/files/helpers/get.py +++ b/files/helpers/get.py @@ -141,7 +141,7 @@ def get_post(i, v=None, graceful=False, rendered=False): ) if rendered: - posts = post.options(joinedload(Submission.flags), joinedload(Submission.awards)) + posts = post.options(joinedload(Submission.flags), joinedload(Submission.awards), joinedload(Submission.author)) post=post.one_or_none() @@ -193,7 +193,7 @@ def get_posts(pids, v=None): blocked, blocked.c.user_id == Submission.author_id, isouter=True - ).options(joinedload(Submission.flags), joinedload(Submission.awards)).all() + ).options(joinedload(Submission.flags), joinedload(Submission.awards), joinedload(Submission.author)).all() output = [p[0] for p in query] for i in range(len(output)): diff --git a/files/routes/posts.py b/files/routes/posts.py index 00eab00e0..7e8ce8204 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -170,7 +170,7 @@ def post_id(pid, anything=None, v=None, sub=None): blocked, blocked.c.user_id == Comment.author_id, isouter=True - ).options(joinedload(Comment.flags), joinedload(Comment.awards)) + ).options(joinedload(Comment.flags), joinedload(Comment.awards), joinedload(Comment.author)) output = [] for c in comments.all():