about summary refs log tree commit diff
path: root/app/services/backup_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/backup_service.rb')
-rw-r--r--app/services/backup_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/backup_service.rb b/app/services/backup_service.rb
index 8492c1117..da7db6462 100644
--- a/app/services/backup_service.rb
+++ b/app/services/backup_service.rb
@@ -18,7 +18,7 @@ class BackupService < BaseService
   def build_json!
     @collection = serialize(collection_presenter, ActivityPub::CollectionSerializer)
 
-    account.statuses.with_includes.find_in_batches do |statuses|
+    account.statuses.with_includes.reorder(nil).find_in_batches do |statuses|
       statuses.each do |status|
         item = serialize(status, ActivityPub::ActivitySerializer)
         item.delete(:'@context')
@@ -60,7 +60,7 @@ class BackupService < BaseService
   end
 
   def dump_media_attachments!(tar)
-    MediaAttachment.attached.where(account: account).find_in_batches do |media_attachments|
+    MediaAttachment.attached.where(account: account).reorder(nil).find_in_batches do |media_attachments|
       media_attachments.each do |m|
         download_to_tar(tar, m.file, m.file.path)
       end