about summary refs log tree commit diff
path: root/app/services/backup_service.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-02-24 21:18:26 +0100
committermultiple creatures <dev@multiple-creature.party>2020-04-04 12:24:01 -0500
commiteed9dd2ad94b2d46484270d47bb7b59292d37355 (patch)
treec634ec84aace0e19bfef15431f0f9c201cf85ab6 /app/services/backup_service.rb
parentd3e681911bd043c3d6e857c1bb763d3281a23881 (diff)
Fix backups failing when files are missing from media attachments (#13146)
Fixes #13123
Diffstat (limited to 'app/services/backup_service.rb')
-rw-r--r--app/services/backup_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/backup_service.rb b/app/services/backup_service.rb
index ab6d090a0..691d024e1 100644
--- a/app/services/backup_service.rb
+++ b/app/services/backup_service.rb
@@ -66,6 +66,8 @@ class BackupService < BaseService
   def dump_media_attachments!(tar)
     MediaAttachment.attached.where(account: account).reorder(nil).find_in_batches do |media_attachments|
       media_attachments.each do |m|
+        next unless m.file&.path
+
         download_to_tar(tar, m.file, m.file.path)
       end