fix(merge): transfers hidden procedures
This commit is contained in:
parent
f391207919
commit
1760ccbc01
2 changed files with 7 additions and 4 deletions
|
@ -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|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue