diff --git a/lib/templates/process_document.rb b/lib/templates/process_document.rb index d7f3d36f..74949893 100644 --- a/lib/templates/process_document.rb +++ b/lib/templates/process_document.rb @@ -85,6 +85,8 @@ module Templates end Concurrent::Promise.zip(*promises).value!.each do |blob| + next unless blob + ApplicationRecord.no_touching do ActiveStorage::Attachment.create!( blob:, @@ -114,6 +116,10 @@ module Templates blob.upload(io) blob + rescue Vips::Error => e + Rollbar.warning(e) if defined?(Rollbar) + + nil end def maybe_flatten_form(data, pdf)