mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Fix backups failing when files are missing from media attachments (#13146)
Fixes #13123
This commit is contained in:
parent
3704402dcc
commit
d91946ae13
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user