1
0
Fork 1
forked from fedi/mastodon

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

This commit is contained in:
Jeong Arm 2022-09-21 06:50:19 +09:00 committed by GitHub
parent 7b38cb88ca
commit 882e54c786
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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|