fix(clone): on procedure clone, discard integrity error

This commit is contained in:
simon lehericey 2022-10-28 12:32:06 +02:00 committed by LeSim
parent 2201114028
commit 52b7886961

View file

@ -479,7 +479,7 @@ class Procedure < ApplicationRecord
procedure = self.deep_clone(include: include_list) do |original, kopy|
begin
PiecesJustificativesService.clone_attachments(original, kopy)
rescue ActiveStorage::FileNotFoundError
rescue ActiveStorage::FileNotFoundError, ActiveStorage::IntegrityError
end
end
procedure.path = SecureRandom.uuid