* Use a fallback link to locate in case session has no related data.

This commit is contained in:
dingguodong
2023-09-13 14:20:46 +08:00
parent a7972989f7
commit 1d67eabaff
+6 -1
View File
@@ -1190,7 +1190,12 @@ class execution extends control
$allProjects = $this->project->getPairsByModel('all', 'noclosed', isset($projectID) ? $projectID : 0);
}
if(!$this->post->executionIDList) return $this->locate($this->session->executionList);
if(!$this->post->executionIDList)
{
/* Use a fallback link to locate in case session has no related data. */
$locateLink = !empty($this->session->executionList) ? $this->session->executionList : $this->createLink('execution', 'all');
return $this->locate($locateLink);
}
$executionIDList = $this->post->executionIDList;
$executions = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->in($executionIDList)->fetchAll('id');