Fix Lint/UselessAssignment
cop (#27472)
This commit is contained in:
parent
7bc8f03162
commit
bcd0171e5e
16 changed files with 22 additions and 50 deletions
|
@ -19,7 +19,6 @@ class AddSilencedAtSuspendedAtToAccounts < ActiveRecord::Migration[5.2]
|
|||
# Record suspend date of blocks and silences for users whose limitations match
|
||||
# a domain block
|
||||
DomainBlock.where(severity: [:silence, :suspend]).find_each do |block|
|
||||
scope = block.accounts
|
||||
if block.suspend?
|
||||
block.accounts.where(suspended: true).in_batches.update_all(suspended_at: block.created_at)
|
||||
else
|
||||
|
|
|
@ -18,7 +18,6 @@ class RemoveSuspendedSilencedAccountFields < ActiveRecord::Migration[5.2]
|
|||
# Record suspend date of blocks and silences for users whose limitations match
|
||||
# a domain block
|
||||
DomainBlock.where(severity: [:silence, :suspend]).find_each do |block|
|
||||
scope = block.accounts
|
||||
if block.suspend?
|
||||
block.accounts.where(suspended: true).in_batches.update_all(suspended_at: block.created_at)
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue