* Cannot delete the parent task when task's parent is '-1'.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user