* Adjust response when there is no execution.

This commit is contained in:
daitingting
2024-01-03 11:07:58 +00:00
parent c2d548a8f6
commit f76079f2e7
+2 -1
View File
@@ -1557,7 +1557,8 @@ class execution extends control
$executionID = $this->execution->checkAccess((int)$executionID, $this->executions);
$execution = $this->execution->getByID($executionID, true);
$type = $this->config->vision == 'lite' ? 'kanban' : 'stage,sprint,kanban';
if(empty($execution) || strpos($type, $execution->type) === false) return $this->sendError($this->lang->notFound, true);
if(empty($execution) || strpos($type, $execution->type) === false) return $this->send(array('result' => 'success', 'load' => array('alert' => $this->lang->notFound, 'locate' => $this->createLink('execution', 'all'))));
if($execution->type == 'kanban' and defined('RUN_MODE') and RUN_MODE == 'api') return print($this->fetch('execution', 'kanban', "executionID=$executionID"));