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():