master
Aevann1 2022-07-01 20:09:56 +02:00
parent e8f5827c5e
commit 9ffc3015e2
2 changed files with 3 additions and 3 deletions

View File

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

View File

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