From 3e87b20ed0eb086f2502de36d0f8035e3c320528 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 3 Jul 2022 13:30:54 +0200 Subject: [PATCH] more query optiimzation v2 --- files/helpers/get.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/get.py b/files/helpers/get.py index 5351b20fa..b413e4a51 100644 --- a/files/helpers/get.py +++ b/files/helpers/get.py @@ -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()