Ajout d'un cas chaine nulle
This commit is contained in:
parent
3a28a5ce30
commit
8666f51e76
@ -35,6 +35,8 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
def remove_accents(input_str):
|
def remove_accents(input_str):
|
||||||
|
if input_str is None:
|
||||||
|
return None
|
||||||
nfkd_form = unicodedata.normalize("NFKD", input_str)
|
nfkd_form = unicodedata.normalize("NFKD", input_str)
|
||||||
return "".join([c for c in nfkd_form if not unicodedata.combining(c)])
|
return "".join([c for c in nfkd_form if not unicodedata.combining(c)])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user