]> cat aescling's git repositories - mastodon.git/commitdiff
Fix scoped order warning in RemoveStatusService (#16531)
authorClaire <claire.github-309c@sitedethib.com>
Sat, 24 Jul 2021 12:41:46 +0000 (14:41 +0200)
committerGitHub <noreply@github.com>
Sat, 24 Jul 2021 12:41:46 +0000 (14:41 +0200)
Fixes “Scoped order is ignored, it's forced to be batch order.”

app/services/remove_status_service.rb

index b680c8e961e725d375120c060d6bf00cacd15f68..f9c3dcf78590643ae39bfb2f821c54c1e478bb28 100644 (file)
@@ -102,7 +102,7 @@ class RemoveStatusService < BaseService
     # because once original status is gone, reblogs will disappear
     # without us being able to do all the fancy stuff
 
-    @status.reblogs.includes(:account).find_each do |reblog|
+    @status.reblogs.includes(:account).reorder(nil).find_each do |reblog|
       RemoveStatusService.new.call(reblog, original_removed: true)
     end
   end