unmessing with queries

master
Aevann1 2022-07-03 06:34:29 +02:00
parent 91951ed142
commit c8b4838157
2 changed files with 3 additions and 3 deletions

View File

@ -147,7 +147,7 @@ def get_post(i, v=None, graceful=False, rendered=False):
posts = post.options(
joinedload(Submission.flags),
joinedload(Submission.awards),
joinedload(Submission.author).joinedload(User.badges),
joinedload(Submission.author),
joinedload(Submission.options).joinedload(SubmissionOption.votes)
)
@ -203,7 +203,7 @@ def get_posts(pids, v=None):
isouter=True
).options(joinedload(Submission.flags),
joinedload(Submission.awards),
joinedload(Submission.author).joinedload(User.badges),
joinedload(Submission.author),
joinedload(Submission.options).joinedload(SubmissionOption.votes)
).all()

View File

@ -174,7 +174,7 @@ def post_id(pid, anything=None, v=None, sub=None):
joinedload(Comment.child_comments),
joinedload(Comment.flags),
joinedload(Comment.awards),
joinedload(Comment.author).joinedload(User.badges),
joinedload(Comment.author),
joinedload(Comment.options).joinedload(CommentOption.votes)
)