From 39917c0613c5faf3a9bb94352015954950af4b74 Mon Sep 17 00:00:00 2001 From: MuK IT GmbH Date: Wed, 27 Mar 2019 00:04:18 +0000 Subject: [PATCH] publish muk_utils - 12.0 --- muk_utils/__manifest__.py | 2 +- muk_utils/tools/file.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/muk_utils/__manifest__.py b/muk_utils/__manifest__.py index 2627653..6c6f962 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.14', + "version": '12.0.1.6.15', "category": 'Extra Tools', "license": "AGPL-3", "author": "MuK IT", diff --git a/muk_utils/tools/file.py b/muk_utils/tools/file.py index 6200804..e71899b 100644 --- a/muk_utils/tools/file.py +++ b/muk_utils/tools/file.py @@ -41,11 +41,11 @@ _logger = logging.getLogger(__name__) #---------------------------------------------------------- def slugify(value, lower=True): - value = str(unicodedata.normalize('NFKD', value)) - value = str(value.encode('ascii', 'ignore')) - value = str(re.sub('[^\w\s-]', '', value)) - value = str(re.sub('[-\s]+', '-', value)) + value = unicodedata.normalize('NFKD', value) + value = value.encode('ascii', 'ignore').decode('ascii') value = value.lower() if lower else value + value = re.sub('[^\w\s-]', '', value) + value = re.sub('[-\s]+', '-', value) return value.strip() def check_name(name):