From e8938a96ff87b6e49cf010a25a3740d4c8ab69a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 13 Sep 2021 23:43:03 +0200 Subject: [PATCH] Add remove_forbidden_chars in tools issue10684 review371581002 --- scripts/import_countries.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/import_countries.py b/scripts/import_countries.py index 626e1ceee8..d56e2a3e41 100755 --- a/scripts/import_countries.py +++ b/scripts/import_countries.py @@ -37,11 +37,8 @@ def _get_language_codes(): def _remove_forbidden_chars(name): - from trytond.model.fields import Char - for c in Char.forbidden_chars: - if c in name: - name.replace(c, ' ') - return name.strip() + from trytond.tools import remove_forbidden_chars + return remove_forbidden_chars(name) def get_countries():