From 45afe494ecd1f1c675dfdb9693cfff417aaac4c0 Mon Sep 17 00:00:00 2001 From: Kevin McConnell Date: Mon, 1 Dec 2025 15:40:07 +0000 Subject: [PATCH] Skip missing files --- app/models/account/export.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/account/export.rb b/app/models/account/export.rb index 289c0352f..0f3d50f0c 100644 --- a/app/models/account/export.rb +++ b/app/models/account/export.rb @@ -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