diff --git a/app/models/type_de_champ.rb b/app/models/type_de_champ.rb index c500472ce..1a1c9306e 100644 --- a/app/models/type_de_champ.rb +++ b/app/models/type_de_champ.rb @@ -440,7 +440,7 @@ class TypeDeChamp < ApplicationRecord end def current_section_level - tdcs = private? ? revision.type_champs_private.to_a : revision.types_de_champ_public.to_a + 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