From e12d8893f42e5d2b2c71b43e0dff09438fbe81a2 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 3 Jan 2024 08:06:15 -0500 Subject: [PATCH] Fix intermittent failure from unspecified order in `export_domain_blocks` controller spec (#28562) --- app/controllers/admin/export_domain_blocks_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/export_domain_blocks_controller.rb b/app/controllers/admin/export_domain_blocks_controller.rb index 433b8a158..ffc447817 100644 --- a/app/controllers/admin/export_domain_blocks_controller.rb +++ b/app/controllers/admin/export_domain_blocks_controller.rb @@ -68,7 +68,7 @@ module Admin def export_data CSV.generate(headers: export_headers, write_headers: true) do |content| - DomainBlock.with_limitations.each do |instance| + DomainBlock.with_limitations.order(id: :asc).each do |instance| content << [instance.domain, instance.severity, instance.reject_media, instance.reject_reports, instance.public_comment, instance.obfuscate] end end