Clean code

This commit is contained in:
Yohann D'ANELLO 2020-02-10 17:07:06 +01:00
parent 8dbf0494c2
commit 11f0eff4d4
1 changed files with 2 additions and 1 deletions

View File

@ -116,7 +116,8 @@ class MediaAdminForm(ModelForm):
# Normalize side identifier, in order to remove accents
side_identifier = ''.join(
char
for char in unicodedata.normalize('NFKD', side_identifier.casefold())
for char in unicodedata.normalize(
'NFKD', side_identifier.casefold())
if all(not unicodedata.category(char).startswith(cat)
for cat in {'M', 'P', 'Z', 'C'}) or char == ' '
).casefold().upper()