From 83a19e476039f6883377396a69660cd385299ea5 Mon Sep 17 00:00:00 2001 From: benoitqueyron <72251526+Benoit-MINT@users.noreply.github.com> Date: Wed, 28 Aug 2024 10:31:26 +0200 Subject: [PATCH] ProcedureRevision#compare_type_de_champ: fix bug comparaison character_limit chaine vide vs nil --- app/models/procedure_revision.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/procedure_revision.rb b/app/models/procedure_revision.rb index c6e0df7c53d..3fd1c46d7ff 100644 --- a/app/models/procedure_revision.rb +++ b/app/models/procedure_revision.rb @@ -458,7 +458,7 @@ def compare_type_de_champ(from_type_de_champ, to_type_de_champ, from_coordinates to_type_de_champ.filename_for_attachement(:notice_explicative)) end elsif to_type_de_champ.textarea? - if from_type_de_champ.character_limit != to_type_de_champ.character_limit + if from_type_de_champ.character_limit.presence != to_type_de_champ.character_limit.presence changes << ProcedureRevisionChange::UpdateChamp.new(from_type_de_champ, :character_limit, from_type_de_champ.character_limit,