Fix Ambiguous SQL error on tootctl media refresh (#19206)

th-downstream
Jeong Arm 2 years ago committed by GitHub
parent 4be7a4764e
commit 32efaf0856

@ -234,7 +234,7 @@ module Mastodon
end
if options[:days].present?
scope = scope.where('id > ?', Mastodon::Snowflake.id_at(options[:days].days.ago, with_random: false))
scope = scope.where('media_attachments.id > ?', Mastodon::Snowflake.id_at(options[:days].days.ago, with_random: false))
end
processed, aggregate = parallelize_with_progress(scope) do |media_attachment|

Loading…
Cancel
Save