correctif(champ.normalize): enleve les null chars uniquement si il y en a. sinon on rappel value=() avec nos champs surchargeant ce setter

This commit is contained in:
Martin 2022-12-27 11:43:34 +01:00
parent 72791bd5b6
commit 3732c079a7

View file

@ -262,6 +262,7 @@ class Champ < ApplicationRecord
def normalize def normalize
return if value.nil? return if value.nil?
return if value.present? && !value.include?("\u0000")
self.value = value.delete("\u0000") self.value = value.delete("\u0000")
end end