fix(rebase): destroy_all to cascade on dependencies (destroy geoareas)
This commit is contained in:
parent
d9b6db8ebc
commit
064f926428
1 changed files with 2 additions and 2 deletions
|
@ -72,8 +72,8 @@ module DossierRebaseConcern
|
||||||
|
|
||||||
# remove champ
|
# remove champ
|
||||||
children_champ, root_champ = changes_by_op[:remove].partition(&:child?)
|
children_champ, root_champ = changes_by_op[:remove].partition(&:child?)
|
||||||
children_champ.each { champs_by_stable_id[_1.stable_id].delete_all }
|
children_champ.each { champs_by_stable_id[_1.stable_id].destroy_all }
|
||||||
root_champ.each { champs_by_stable_id[_1.stable_id].delete_all }
|
root_champ.each { champs_by_stable_id[_1.stable_id].destroy_all }
|
||||||
|
|
||||||
# update champ
|
# update champ
|
||||||
changes_by_op[:update].each { apply(_1, champs_by_stable_id[_1.stable_id]) }
|
changes_by_op[:update].each { apply(_1, champs_by_stable_id[_1.stable_id]) }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue