fix(merge): transfers hidden procedures

This commit is contained in:
simon lehericey 2022-11-07 14:11:05 +01:00
parent f391207919
commit 1760ccbc01
2 changed files with 7 additions and 4 deletions

View file

@ -110,7 +110,9 @@ class Administrateur < ApplicationRecord
def merge(old_admin)
return if old_admin.nil?
procedures_with_new_admin, procedures_without_new_admin = old_admin.procedures
procedures_with_new_admin, procedures_without_new_admin = old_admin
.procedures
.with_discarded
.partition { |p| p.administrateurs.exists?(id) }
procedures_with_new_admin.each do |p|