Python 3.5 support

This commit is contained in:
Yohann D'ANELLO 2020-02-10 17:29:10 +01:00
parent ea821483d0
commit 70045d4e2d
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ class MediaAdminForm(ModelForm):
self.download_data_openlibrary(isbn) self.download_data_openlibrary(isbn)
if self.cleaned_data['authors']: if self.cleaned_data['authors']:
authors: list = self.cleaned_data['authors'] authors = self.cleaned_data['authors']
def sort(author): def sort(author):
return str(-author.note) + "." + author.name return str(-author.note) + "." + author.name
authors.sort(key=sort) authors.sort(key=sort)