From 9d1010764d7aee287f5f68707335fac9feaf101a Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 13 Nov 2023 10:57:59 +0800 Subject: [PATCH] * Optimize code. --- module/testcase/zen.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/testcase/zen.php b/module/testcase/zen.php index 2cbc65c8b3..13944cd27c 100644 --- a/module/testcase/zen.php +++ b/module/testcase/zen.php @@ -1278,8 +1278,8 @@ class testcaseZen extends testcase /* 设置需求键对。 */ /* Set story pairs. */ - $story = $storyID ? $this->loadModel('story')->getByID($storyID) : ''; - $storyPairs = $this->story->getProductStoryPairs($productID, $branch === 'all' ? 0 : $branch); + $storyPairs = $this->loadModel('story')->getProductStoryPairs($productID, $branch === 'all' ? 0 : $branch); + $story = $storyID ? $this->story->getByID($storyID) : ''; $storyPairs += $storyID ? array($storyID => $story->id . ':' . $story->title) : array(); if($storyID && empty($moduleID)) $moduleID = $story->module;