Merge pull request #8955 from tchak/fix-typo
ETQ instructeur, je veux pouvoir accéder à mes annotations privées
This commit is contained in:
commit
fdb361c207
2 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@
|
|||
class Champs::HeaderSectionChamp < Champ
|
||||
def level
|
||||
if parent.present?
|
||||
header_section_level_value.to_i + parent.current_section_level
|
||||
header_section_level_value.to_i + parent.current_section_level(dossier.revision)
|
||||
elsif header_section_level_value
|
||||
header_section_level_value.to_i
|
||||
else
|
||||
|
|
|
@ -439,8 +439,8 @@ class TypeDeChamp < ApplicationRecord
|
|||
errs
|
||||
end
|
||||
|
||||
def current_section_level
|
||||
tdcs = private? ? revision.type_champs_private.to_a : revision.types_de_champ_public.to_a
|
||||
def current_section_level(revision)
|
||||
tdcs = private? ? revision.types_de_champ_private.to_a : revision.types_de_champ_public.to_a
|
||||
|
||||
previous_section_level(tdcs.take(tdcs.find_index(self)))
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue