diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/account.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 648378f7b..1f06926fd 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -438,7 +438,7 @@ class Account < ApplicationRecord accounts.*, (count(f.id) + 1) * ts_rank_cd(#{textsearch}, #{query}, 32) AS rank FROM accounts - LEFT OUTER JOIN follows AS f ON (accounts.id = f.account_id AND f.target_account_id = ?) OR (accounts.id = f.target_account_id AND f.account_id = ?) + LEFT OUTER JOIN follows AS f ON (accounts.id = f.account_id AND f.target_account_id = ?) WHERE accounts.id IN (SELECT * FROM first_degree) AND #{query} @@ #{textsearch} AND accounts.suspended_at IS NULL @@ -448,7 +448,7 @@ class Account < ApplicationRecord LIMIT ? OFFSET ? SQL - records = find_by_sql([sql, account.id, account.id, account.id, account.id, limit, offset]) + records = find_by_sql([sql, account.id, account.id, account.id, limit, offset]) else sql = <<-SQL.squish SELECT |