Merge pull request #8955 from tchak/fix-typo

ETQ instructeur, je veux pouvoir accéder à mes annotations privées
This commit is contained in:
mfo 2023-04-25 12:47:49 +00:00 committed by GitHub
commit fdb361c207
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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