Ajout d'un cas chaine nulle

This commit is contained in:
Jean-Marie Favreau 2024-09-13 14:05:31 +02:00
parent 3a28a5ce30
commit 8666f51e76

View File

@ -35,6 +35,8 @@ logger = logging.getLogger(__name__)
def remove_accents(input_str):
if input_str is None:
return None
nfkd_form = unicodedata.normalize("NFKD", input_str)
return "".join([c for c in nfkd_form if not unicodedata.combining(c)])