Fix reset order on delete
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4feb120366
commit
07a69f24fb
@ -121,11 +121,6 @@ def remove_garbage(link):
|
||||
@mysql_required
|
||||
@auth.login_required
|
||||
def admin():
|
||||
folders = AnimeFolder.query.all()
|
||||
for folder in folders:
|
||||
for title in folder.titles:
|
||||
title.links.sort(key=attrgetter('season'))
|
||||
folder.titles.sort(key=attrgetter('name'))
|
||||
form = DeleteForm(request.form)
|
||||
|
||||
if form.validate_on_submit():
|
||||
@ -138,6 +133,12 @@ def admin():
|
||||
else:
|
||||
form._errors = {'id': ['Id %s was not found in the database' % form.id.data]}
|
||||
|
||||
folders = AnimeFolder.query.all()
|
||||
for folder in folders:
|
||||
for title in folder.titles:
|
||||
title.links.sort(key=attrgetter('season'))
|
||||
folder.titles.sort(key=attrgetter('name'))
|
||||
|
||||
return render_template('admin/list.html', search_form=SearchForm(), folders=folders, action_form=form)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user