diff options
author | Starfall <us@starfall.systems> | 2021-01-26 16:42:38 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2021-01-26 16:42:38 -0600 |
commit | 3ef928029d94a2b3c6abf96a2935de85c4eed6c8 (patch) | |
tree | d8697b527a0a42e51634b1fef68f0162fe2ccbe2 /lib | |
parent | 65263e6309fb4dea1a93d4b4806af629d317c156 (diff) | |
parent | 52ff3ca675ecac0ff32990b6321fb5e349e6dc59 (diff) |
Merge remote-tracking branch 'glitchsoc/main' into main
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mastodon/domains_cli.rb | 2 | ||||
-rw-r--r-- | lib/mastodon/media_cli.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/mastodon/domains_cli.rb b/lib/mastodon/domains_cli.rb index 3c2dfd4ec..4ebd8a1e2 100644 --- a/lib/mastodon/domains_cli.rb +++ b/lib/mastodon/domains_cli.rb @@ -93,7 +93,7 @@ module Mastodon work_unit = ->(domain) do next if stats.key?(domain) - next if options[:exclude_suspended] && domain.match(blocked_domains) + next if options[:exclude_suspended] && domain.match?(blocked_domains) stats[domain] = nil diff --git a/lib/mastodon/media_cli.rb b/lib/mastodon/media_cli.rb index 5f4a414b1..59c118500 100644 --- a/lib/mastodon/media_cli.rb +++ b/lib/mastodon/media_cli.rb @@ -326,7 +326,7 @@ module Mastodon end preload_map.each_with_object({}) do |(model_name, record_ids), model_map| - model_map[model_name] = model_name.constantize.where(id: record_ids).each_with_object({}) { |record, record_map| record_map[record.id] = record } + model_map[model_name] = model_name.constantize.where(id: record_ids).index_by(&:id) end end end |