* Cannot delete the parent task when task's parent is '-1'.

This commit is contained in:
liumengyi
2023-12-16 16:13:42 +08:00
parent 16b9cff348
commit b58e225a3c
+1 -1
View File
@@ -950,7 +950,7 @@ class task extends control
public function delete(int $executionID, int $taskID)
{
$task = $this->task->getByID($taskID);
if($task->parent == 0) return $this->send(array('result' => 'fail', 'message' => $this->lang->task->cannotDeleteParent));
if($task->parent == '-1') return $this->send(array('result' => 'fail', 'message' => $this->lang->task->cannotDeleteParent));
$this->task->delete(TABLE_TASK, $taskID);
if($task->parent > 0)