fix(apply_diff): one more time
This commit is contained in:
parent
d9b6db8ebc
commit
a865e00f4d
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…
Add table
Reference in a new issue