Merge pull request #10099 from tchak/fix-apply-diff
fix(apply_diff): one more time
This commit is contained in:
commit
847d4d4c9b
1 changed files with 2 additions and 4 deletions
|
@ -170,9 +170,7 @@ module DossierCloneConcern
|
|||
children_champs_to_remove, root_champs_to_remove = champs_to_remove.partition(&:child?)
|
||||
|
||||
children_champs_to_remove.each(&:destroy!)
|
||||
root_champs_to_remove.each do |champ|
|
||||
champ.rows.flatten.each(&:destroy!) if champ.repetition?
|
||||
champ.destroy!
|
||||
end
|
||||
Champ.where(parent_id: root_champs_to_remove.map(&:id)).destroy_all
|
||||
root_champs_to_remove.each(&:destroy!)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue