1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2024-11-26 20:47:10 +00:00

Python 3.5 support

This commit is contained in:
Yohann D'ANELLO 2020-02-10 17:29:10 +01:00
parent ea821483d0
commit 70045d4e2d

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)