refactor(active_storage): no download on clone
This commit is contained in:
parent
b526fef4db
commit
95f65900d3
5 changed files with 30 additions and 49 deletions
|
@ -488,10 +488,7 @@ class Procedure < ApplicationRecord
|
|||
}
|
||||
include_list[:groupe_instructeurs] = :instructeurs if !is_different_admin
|
||||
procedure = self.deep_clone(include: include_list) do |original, kopy|
|
||||
begin
|
||||
PiecesJustificativesService.clone_attachments(original, kopy)
|
||||
rescue ActiveStorage::FileNotFoundError, ActiveStorage::IntegrityError
|
||||
end
|
||||
PiecesJustificativesService.clone_attachments(original, kopy)
|
||||
end
|
||||
procedure.path = SecureRandom.uuid
|
||||
procedure.aasm_state = :brouillon
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue