Accept code change suggestion from review

pull/31481/head
Emelia Smith 2024-11-21 17:31:56 +01:00
parent 3896a5bd37
commit 194a8cbb2a
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ class InstanceFilter
when :suspended when :suspended
Instance.joins(:domain_block).where(domain_blocks: { severity: :suspend }).reorder(Arel.sql('domain_blocks.id desc')) Instance.joins(:domain_block).where(domain_blocks: { severity: :suspend }).reorder(Arel.sql('domain_blocks.id desc'))
when :limited 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 when :unrestricted
# Finds all instances where there isn't a record in the domain_blocks table # 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 }) Instance.left_outer_joins(:domain_block).where(domain_blocks: { domain: nil })