aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2019-11-14 23:38:55 +0000
committerrubenwardy <rw@rubenwardy.com>2019-11-14 23:39:41 +0000
commit015abe5a2507ad02273bc89953016c386aae4457 (patch)
treee7512f119e82a844de81b36f3080a406fae2009c /app/views
parent719a652235126fd972e41e62f6f519aec5b75bdc (diff)
downloadcheatdb-1.18.0.tar.xz
Indicate stuck releases in todo list and allow admins to delete themv1.18.0
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/admin.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/views/admin/admin.py b/app/views/admin/admin.py
index b2b615d..b359700 100644
--- a/app/views/admin/admin.py
+++ b/app/views/admin/admin.py
@@ -33,7 +33,11 @@ import datetime
def admin_page():
if request.method == "POST":
action = request.form["action"]
- if action == "importmodlist":
+ if action == "delstuckreleases":
+ PackageRelease.query.filter(PackageRelease.task_id != None).delete()
+ db.session.commit()
+ return redirect(url_for("admin_page"))
+ elif action == "importmodlist":
task = importTopicList.delay()
return redirect(url_for("check_task", id=task.id, r=url_for("todo_topics_page")))
elif action == "checkusers":