FUCK LINTERS TEST (ERDNAXE C'EST RELOUUU)

This commit is contained in:
Yohann D'ANELLO 2020-02-10 21:21:32 +01:00
parent 2753f700a6
commit ff224d20cd
1 changed files with 5 additions and 5 deletions

View File

@ -104,7 +104,7 @@ class MediaAdminForm(ModelForm):
if self.cleaned_data['title']:
self.cleaned_data['title'] = re.sub(r'\(AUT\) ',
'', self.cleaned_data['title'])
'', self.cleaned_data['title'])
if self.cleaned_data['authors']:
authors = self.cleaned_data['authors']
@ -112,8 +112,8 @@ class MediaAdminForm(ModelForm):
def sort(author):
return str(-author.note) + "." \
+ str(old_authors.index(author)) \
+ "." + author.name
+ str(old_authors.index(author)) \
+ "." + author.name
authors.sort(key=sort)
author_name = self.cleaned_data['authors'][0].name
@ -132,9 +132,9 @@ class MediaAdminForm(ModelForm):
if self.cleaned_data['subtitle']:
self.cleaned_data['subtitle'] = re.sub(r'</span>',
'', self.cleaned_data['subtitle'])
'', self.cleaned_data['subtitle'])
self.cleaned_data['subtitle'] = re.sub(r'<span.*>',
'', self.cleaned_data['subtitle'])
'', self.cleaned_data['subtitle'])
start = self.cleaned_data['subtitle'].split(' ')[0] \
.replace('.', '')