Update ordering to use `id` from body of document instead of deprecated `_id` (#26659)

This commit is contained in:
jsgoldstein 2023-08-25 12:16:08 -04:00 committed by GitHub
parent e4c0ce18a3
commit 8e8747c564
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class StatusesSearchService < BaseService
) )
) )
results = definition.collapse(field: :id).order(_id: { order: :desc }).limit(@limit).offset(@offset).objects.compact results = definition.collapse(field: :id).order(id: { order: :desc }).limit(@limit).offset(@offset).objects.compact
account_ids = results.map(&:account_id) account_ids = results.map(&:account_id)
account_domains = results.map(&:account_domain) account_domains = results.map(&:account_domain)
preloaded_relations = @account.relations_map(account_ids, account_domains) preloaded_relations = @account.relations_map(account_ids, account_domains)