diff --git a/tryton/tryton/common/common.py b/tryton/tryton/common/common.py index b8936077cc..28eee48b1c 100644 --- a/tryton/tryton/common/common.py +++ b/tryton/tryton/common/common.py @@ -595,7 +595,10 @@ def _slugify_filename(filename): name, ext = filename else: name, ext = os.path.splitext(filename) - return ''.join([slugify(name), os.extsep, slugify(ext)]) + parts = [slugify(name)] + if ext: + parts.extend([os.extsep, slugify(ext)]) + return ''.join(parts) def file_write(filename, data):