fix(rebase): destroy_all to cascade on dependencies (destroy geoareas)

This commit is contained in:
Martin 2024-03-12 11:36:30 +01:00
parent d9b6db8ebc
commit 064f926428

View file

@ -72,8 +72,8 @@ module DossierRebaseConcern
# remove champ
children_champ, root_champ = changes_by_op[:remove].partition(&:child?)
children_champ.each { champs_by_stable_id[_1.stable_id].delete_all }
root_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].destroy_all }
# update champ
changes_by_op[:update].each { apply(_1, champs_by_stable_id[_1.stable_id]) }