From 3732c079a7d79bf25619a6bd59064a960865b673 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 27 Dec 2022 11:43:34 +0100 Subject: [PATCH] correctif(champ.normalize): enleve les null chars uniquement si il y en a. sinon on rappel value=() avec nos champs surchargeant ce setter --- app/models/champ.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/champ.rb b/app/models/champ.rb index 69dd3bc11..63cfe1bac 100644 --- a/app/models/champ.rb +++ b/app/models/champ.rb @@ -262,6 +262,7 @@ class Champ < ApplicationRecord def normalize return if value.nil? + return if value.present? && !value.include?("\u0000") self.value = value.delete("\u0000") end