forked from MarseyWorld/MarseyWorld
more query optiimzation v2
parent
72884713ac
commit
3e87b20ed0
|
@ -151,7 +151,7 @@ def get_post(i, v=None, graceful=False, rendered=False, entered=False):
|
||||||
joinedload(Submission.options).joinedload(SubmissionOption.votes)
|
joinedload(Submission.options).joinedload(SubmissionOption.votes)
|
||||||
)
|
)
|
||||||
|
|
||||||
if entered:
|
if v and entered:
|
||||||
post = post.options(joinedload(Submission.comments))
|
post = post.options(joinedload(Submission.comments))
|
||||||
|
|
||||||
post=post.one_or_none()
|
post=post.one_or_none()
|
||||||
|
|
Loading…
Reference in New Issue