about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJeong Arm <kjwonmail@gmail.com>2022-09-21 06:50:19 +0900
committerGitHub <noreply@github.com>2022-09-20 23:50:19 +0200
commit882e54c78678bd4247d70fe5b04571543769bcee (patch)
tree8b8fcc8fec94b7fb2444ec30d4a2b4bd5a0c6571
parent7b38cb88caa46a47eb7b18f2211ef768923568aa (diff)
Fix Ambiguous SQL error on tootctl media refresh (#19206)
-rw-r--r--lib/mastodon/media_cli.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mastodon/media_cli.rb b/lib/mastodon/media_cli.rb
index 4904cc5eb..bba4a1bd7 100644
--- a/lib/mastodon/media_cli.rb
+++ b/lib/mastodon/media_cli.rb
@@ -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|