diff --git a/muk_utils/__manifest__.py b/muk_utils/__manifest__.py index 6aa4b67..4a0bc44 100644 --- a/muk_utils/__manifest__.py +++ b/muk_utils/__manifest__.py @@ -19,7 +19,7 @@ { "name": "MuK Utils", "summary": """Utility Features""", - "version": '12.0.1.6.9', + "version": '12.0.1.6.10', "category": 'Extra Tools', "license": "AGPL-3", "author": "MuK IT", diff --git a/muk_utils/tools/file.py b/muk_utils/tools/file.py index 6930c0b..a4d3d47 100644 --- a/muk_utils/tools/file.py +++ b/muk_utils/tools/file.py @@ -42,10 +42,10 @@ _logger = logging.getLogger(__name__) def slugify(value): value = str(unicodedata.normalize('NFKD', value)) - if sys.version_info < (3,): - value = str(value.encode('ascii', 'ignore')) - value = str(re.sub('[^\w\s-]', '', value).strip().lower()) + value = str(value.encode('ascii', 'ignore')) + value = str(re.sub('[^\w\s-]', '', value)) value = str(re.sub('[-\s]+', '-', value)) + value = value.strip().lower() return value def check_name(name):