Fix wrong comment being used for reviews

Fixes #417
This commit is contained in:
rubenwardy 2023-01-28 16:39:53 +00:00
parent 37b200295c
commit e0f9623670

@ -25,7 +25,7 @@ def home():
def review_load(query): def review_load(query):
return query.options( return query.options(
joinedload(PackageReview.author), 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).joinedload(Package.author).load_only(User.username, User.display_name),
joinedload(PackageReview.package).load_only(Package.title, Package.name).subqueryload(Package.main_screenshot)) joinedload(PackageReview.package).load_only(Package.title, Package.name).subqueryload(Package.main_screenshot))