* testtask: return false if the testtask's status isn't wait.

This commit is contained in:
liugang
2023-09-11 14:55:07 +08:00
parent 8271543d87
commit 8ac9c4e28f
+2 -1
View File
@@ -776,7 +776,8 @@ class testtaskModel extends model
public function start(object $task): bool
{
$taskID = (int)$task->id;
$oldTask = $this->getByID($taskID);
$oldTask = $this->fetchByID($taskID);
if(!$oldTask || $oldTask->status != 'wait') return false;
$this->dao->update(TABLE_TESTTASK)->data($task, 'comment')
->autoCheck()