fix(champs.pj.clone): stop cloning private piece_justificative_file when user clone his dossier

This commit is contained in:
mfo 2024-05-21 09:50:27 +02:00
parent 4629092ab6
commit 4ea601de79
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC
2 changed files with 41 additions and 1 deletions

View file

@ -238,7 +238,7 @@ class Champ < ApplicationRecord
kopy.write_attribute(:stable_id, original.stable_id)
kopy.write_attribute(:stream, 'main')
end
ClonePiecesJustificativesService.clone_attachments(original, kopy)
ClonePiecesJustificativesService.clone_attachments(original, kopy) if fork || !private?
end
end