Merge pull request #9268 from mfo/US/fix-merge-fork-repetition-with-children

correctif(dossier.en_construction): ETQ usager, je souhaite pouvoir modifier un dossier ayant des repetition ayant des enfants
This commit is contained in:
mfo 2023-06-30 10:47:29 +00:00 committed by GitHub
commit 30f6aaed34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,6 +172,9 @@ module DossierCloneConcern
champs_to_remove += diff[:removed]
champs_to_remove
.filter { !_1.child? || !champs_to_remove.include?(_1.parent) }
.each(&:destroy!)
.each do |champ|
champ.rows.flatten.each(&:destroy!) if champ.repetition?
champ.destroy!
end
end
end