Skip to content

Commit

Permalink
Fix Ambiguous SQL error on tootctl media refresh (mastodon#19206)
Browse files Browse the repository at this point in the history
  • Loading branch information
tribela authored Sep 20, 2022
1 parent 7b38cb8 commit 882e54c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mastodon/media_cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def refresh
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|
Expand Down

0 comments on commit 882e54c

Please sign in to comment.