From 194a8cbb2ac98bc3c653efdbaa3385527e7311c0 Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Thu, 21 Nov 2024 17:31:56 +0100 Subject: [PATCH] Accept code change suggestion from review --- app/models/instance_filter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/instance_filter.rb b/app/models/instance_filter.rb index 0d023d4aa4..1fe3779209 100644 --- a/app/models/instance_filter.rb +++ b/app/models/instance_filter.rb @@ -56,7 +56,7 @@ class InstanceFilter when :suspended Instance.joins(:domain_block).where(domain_blocks: { severity: :suspend }).reorder(Arel.sql('domain_blocks.id desc')) when :limited - Instance.joins(:domain_block).where(domain_blocks: { severity: :silence }).or(Instance.joins(:domain_block).where(domain_blocks: { severity: :noop })).reorder(Arel.sql('domain_blocks.id desc')) + Instance.joins(:domain_block).where(domain_blocks: { severity: [:silence, :noop] }).reorder(Arel.sql('domain_blocks.id desc')) when :unrestricted # Finds all instances where there isn't a record in the domain_blocks table Instance.left_outer_joins(:domain_block).where(domain_blocks: { domain: nil })