fix(champ): do not expose champs without row_id in repetitions
This commit is contained in:
parent
2ea45d5dba
commit
7cf1cdb47b
1 changed files with 8 additions and 3 deletions
|
@ -1158,10 +1158,15 @@ class Dossier < ApplicationRecord
|
|||
.transform_values { _1.sort_by(&:id).uniq(&:row_id) }
|
||||
|
||||
if scope.is_a?(TypeDeChamp)
|
||||
revision.children_of(scope)
|
||||
revision
|
||||
.children_of(scope)
|
||||
.flat_map { champs_index[_1.stable_id] || [] }
|
||||
.filter(&:child?)
|
||||
else
|
||||
revision.types_de_champ_for(scope:, root:)
|
||||
end.flat_map { champs_index[_1.stable_id] || [] }
|
||||
revision
|
||||
.types_de_champ_for(scope:, root:)
|
||||
.flat_map { champs_index[_1.stable_id] || [] }
|
||||
end
|
||||
end
|
||||
|
||||
def has_annotations?
|
||||
|
|
Loading…
Reference in a new issue