mirror of
https://github.com/simon987/Simple-Incremental-Search-Tool.git
synced 2025-12-14 07:39:05 +00:00
Code cleanup
This commit is contained in:
10
run.py
10
run.py
@@ -263,13 +263,6 @@ def get_current_task():
|
||||
return ""
|
||||
|
||||
|
||||
@app.route("/task/current/cancel")
|
||||
def cancel_current_task():
|
||||
|
||||
tm.cancel_task()
|
||||
return redirect("/task")
|
||||
|
||||
|
||||
@app.route("/task/add")
|
||||
def task_add():
|
||||
type = request.args.get("type")
|
||||
@@ -284,6 +277,9 @@ def task_add():
|
||||
def task_del(task_id):
|
||||
storage.del_task(task_id)
|
||||
|
||||
if tm.current_task is not None and task_id == tm.current_task.task.id:
|
||||
tm.cancel_task()
|
||||
|
||||
return redirect("/task")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user