]> cat aescling's git repositories - mastodon.git/commitdiff
Fix error in suggestions API due to typo (#17486)
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 8 Feb 2022 21:23:04 +0000 (22:23 +0100)
committerGitHub <noreply@github.com>
Tue, 8 Feb 2022 21:23:04 +0000 (22:23 +0100)
Regression from #17479

app/models/account_suggestions/global_source.rb

index 03ed1b6c2aea459417df158fd16f5029e9f8e2e9..7bca530d4094a082918bf761cd406901418bc50f 100644 (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),