Merge pull request #7971 from demarches-simplifiees/ignore_integrity_error_on_clone
fix(clone): lors du clone d'une procédure, ignore les fichiers corrompus
This commit is contained in:
commit
a2a9a9aec0
1 changed files with 1 additions and 1 deletions
|
@ -479,7 +479,7 @@ class Procedure < ApplicationRecord
|
||||||
procedure = self.deep_clone(include: include_list) do |original, kopy|
|
procedure = self.deep_clone(include: include_list) do |original, kopy|
|
||||||
begin
|
begin
|
||||||
PiecesJustificativesService.clone_attachments(original, kopy)
|
PiecesJustificativesService.clone_attachments(original, kopy)
|
||||||
rescue ActiveStorage::FileNotFoundError
|
rescue ActiveStorage::FileNotFoundError, ActiveStorage::IntegrityError
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
procedure.path = SecureRandom.uuid
|
procedure.path = SecureRandom.uuid
|
||||||
|
|
Loading…
Reference in a new issue