From: Jeong Arm Date: Tue, 20 Sep 2022 21:50:19 +0000 (+0900) Subject: Fix Ambiguous SQL error on tootctl media refresh (#19206) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=689ff050900b130a388b52a9aab2f69f35152689;p=mastodon.git Fix Ambiguous SQL error on tootctl media refresh (#19206) --- 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|