From 1d67eabaff2cfb1ab18ea386532df61242ceebc8 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Wed, 13 Sep 2023 14:20:39 +0800 Subject: [PATCH] * Use a fallback link to locate in case session has no related data. --- module/execution/control.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/execution/control.php b/module/execution/control.php index 16bc88ffa4..0c8b13db27 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -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');