refactor(champ): more concistent champ_for_update usage

This commit is contained in:
Paul Chavard 2024-08-22 17:35:40 +02:00
parent 988025ba69
commit 54926db89b
No known key found for this signature in database
3 changed files with 8 additions and 6 deletions

View file

@ -57,7 +57,7 @@ module DossierChampsConcern
.types_de_champ
.filter { _1.stable_id.in?(stable_ids) }
.filter { !revision.child?(_1) }
.map { champ_for_update(_1, nil, updated_by: nil) }
.map { _1.repetition? ? project_champ(_1, nil) : champ_for_update(_1, nil, updated_by: nil) }
end
def champ_for_update(type_de_champ, row_id, updated_by:)