mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2024-12-24 17:42:23 +00:00
Clean code
This commit is contained in:
parent
8dbf0494c2
commit
11f0eff4d4
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user