Sort links too

This commit is contained in:
Michel Roux 2019-12-15 20:46:13 +01:00
parent 20b87204a7
commit 8ff2f9607b

2
app.py
View File

@ -101,6 +101,8 @@ def list_animes():
def admin(): def admin():
folders = AnimeFolder.query.all() folders = AnimeFolder.query.all()
for folder in folders: for folder in folders:
for title in folder.titles:
title.links.sort(key=attrgetter('season'))
folder.titles.sort(key=attrgetter('name')) folder.titles.sort(key=attrgetter('name'))
form = DeleteForm(request.form) form = DeleteForm(request.form)