From e0f96236703ea6e0c69d4d8cbd3c1b9b798bc0ef Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 28 Jan 2023 16:39:53 +0000 Subject: [PATCH] Fix wrong comment being used for reviews Fixes #417 --- app/blueprints/homepage/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/blueprints/homepage/__init__.py b/app/blueprints/homepage/__init__.py index 61d65c42..cb5e66d9 100644 --- a/app/blueprints/homepage/__init__.py +++ b/app/blueprints/homepage/__init__.py @@ -25,7 +25,7 @@ def home(): def review_load(query): return query.options( joinedload(PackageReview.author), - joinedload(PackageReview.thread).joinedload(Thread.first_reply), + joinedload(PackageReview.thread).subqueryload(Thread.first_reply), joinedload(PackageReview.package).joinedload(Package.author).load_only(User.username, User.display_name), joinedload(PackageReview.package).load_only(Package.title, Package.name).subqueryload(Package.main_screenshot))