DEV: Remove scoped order warning in PostDestroyer.

`Scoped order is ignored, it's forced to be batch order.`

`find_each` ignores the `order` scope and triggers a warning in
production which is noisy.

Follow-up to 7a284164ce
This commit is contained in:
Alan Guo Xiang Tan 2022-04-12 13:28:03 +08:00
parent a47efcd6ec
commit 6fc52d95de
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ class UserDestroyer
# Add info about the user to staff action logs
UserHistory.staff_action_records(
Discourse.system_user, acting_user: user.username
).find_each do |log|
).unscope(:order).find_each do |log|
log.details ||= ''
log.details = (log.details.split("\n") +
["user_id: #{user.id}", "username: #{user.username}"]