From 1370b034d13db77e8398755a597093f20842538f Mon Sep 17 00:00:00 2001 From: evazion Date: Sun, 16 Feb 2020 04:58:11 -0600 Subject: [PATCH] api: don't include can_comment_vote? on users. This triggers multiple comment vote count(*) calls when doing things like /posts.json?only=uploader and the current user is in the set of uploaders. --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 3ea6f2bef..48b3b7b9e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -540,7 +540,7 @@ class User < ApplicationRecord custom_style favorite_count api_regen_multiplier api_burst_limit remaining_api_limit statement_timeout favorite_group_limit favorite_limit tag_query_limit - can_comment_vote? can_remove_from_pools? is_comment_limited? + can_remove_from_pools? is_comment_limited? can_comment? max_saved_searches theme ] end