Fix error in suggestions API due to typo (#17486)

Regression from #17479
This commit is contained in:
Eugen Rochko 2022-02-08 22:23:04 +01:00 committed by GitHub
parent a44cc7931a
commit b0021ca3d5

View file

@ -6,7 +6,7 @@ class AccountSuggestions::GlobalSource < AccountSuggestions::Source
end
def get(account, skip_account_ids: [], limit: 40)
account_ids = account_ids_for_locale(I18n.locale.to_str.split(/[_-]/).first) - [account.id] - skip_account_ids
account_ids = account_ids_for_locale(I18n.locale.to_s.split(/[_-]/).first) - [account.id] - skip_account_ids
as_ordered_suggestions(
scope(account).where(id: account_ids),