mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2024-11-26 21:27:11 +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
|
# Normalize side identifier, in order to remove accents
|
||||||
side_identifier = ''.join(
|
side_identifier = ''.join(
|
||||||
char
|
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)
|
if all(not unicodedata.category(char).startswith(cat)
|
||||||
for cat in {'M', 'P', 'Z', 'C'}) or char == ' '
|
for cat in {'M', 'P', 'Z', 'C'}) or char == ' '
|
||||||
).casefold().upper()
|
).casefold().upper()
|
||||||
|
Loading…
Reference in New Issue
Block a user