Fix ranking order to correct direction

This commit is contained in:
Darius Kazemi 2023-01-05 13:11:04 -08:00
parent 7d12ca1fa5
commit d6171de99f
1 changed files with 1 additions and 1 deletions

View File

@ -524,7 +524,7 @@ class Account < ApplicationRecord
AND accounts.moved_to_account_id IS NULL AND accounts.moved_to_account_id IS NULL
AND (accounts.domain IS NOT NULL OR (users.approved = TRUE AND users.confirmed_at IS NOT NULL)) AND (accounts.domain IS NOT NULL OR (users.approved = TRUE AND users.confirmed_at IS NOT NULL))
GROUP BY accounts.id, s.id, first_degree.target_account_id GROUP BY accounts.id, s.id, first_degree.target_account_id
ORDER BY first_degree.target_account_id, rank ASC ORDER BY first_degree.target_account_id ASC, rank DESC
LIMIT :limit OFFSET :offset LIMIT :limit OFFSET :offset
SQL SQL
end end