summaryrefslogtreecommitdiff
path: root/server/apps/task.py
diff options
context:
space:
mode:
Diffstat (limited to 'server/apps/task.py')
-rw-r--r--server/apps/task.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/apps/task.py b/server/apps/task.py
index 74be644..972c6d7 100644
--- a/server/apps/task.py
+++ b/server/apps/task.py
@@ -399,6 +399,8 @@ def del_task(json_data):
try:
da.cursor.execute(sql)
da.conn.commit()
+ if da.cursor.rowcount == 0:
+ return {"code": "404", "msg": "该任务id未找到!"}
except Exception as e:
error(str(e))
return {"code": 500, "msg": str(e)}