more query optiimzation v2

master
Aevann1 2022-07-03 13:30:54 +02:00
parent 72884713ac
commit 3e87b20ed0
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ def get_post(i, v=None, graceful=False, rendered=False, entered=False):
joinedload(Submission.options).joinedload(SubmissionOption.votes)
)
if entered:
if v and entered:
post = post.options(joinedload(Submission.comments))
post=post.one_or_none()