Commit 2f851d15 authored by ThibG's avatar ThibG Committed by Nathan Ladd

Fix backups failing when files are missing from media attachments (#13146)

Fixes #13123
parent a2d15bf5
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment