From f6652caef4a388e71926c35ff8a4bceeb23cc2d0 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 15 Apr 2026 11:54:38 +0200 Subject: [PATCH] Fix invalid arguments being passed to Redis in custom Chewy strategy (#38684) --- lib/chewy/strategy/mastodon.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/chewy/strategy/mastodon.rb b/lib/chewy/strategy/mastodon.rb index a4b655c506..7eba23a0c9 100644 --- a/lib/chewy/strategy/mastodon.rb +++ b/lib/chewy/strategy/mastodon.rb @@ -17,6 +17,9 @@ module Chewy RedisConnection.with do |redis| redis.pipelined do |pipeline| @stash.each do |type, ids| + ids = ids&.compact + next if ids.blank? + pipeline.sadd("chewy:queue:#{type.name}", ids) end end