Skip missing files

This commit is contained in:
Kevin McConnell
2025-12-01 15:40:07 +00:00
parent 12f6dbf79f
commit 45afe494ec
+2
View File
@@ -70,6 +70,8 @@ class Account::Export < ApplicationRecord
zip.get_output_stream(attachment[:path]) do |f|
attachment[:blob].download { |chunk| f.write(chunk) }
end
rescue ActiveStorage::FileNotFoundError
# Skip attachments where the file is missing from storage
end
end
end