From c5deb3e68d3bb92b6d9c66603121aa9768d76e45 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Tue, 30 Nov 2021 10:57:49 +0800 Subject: [PATCH] * Finish task #45028. --- module/testcase/control.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 5d358961f6..eb650aea6c 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1720,7 +1720,8 @@ class testcase extends control $queryID = (int)$queryID; $product = $this->loadModel('product')->getById($productID); $branches = array(); - if($product->type != 'normal') $branches = array('0' => $this->lang->branch->main) + $this->loadModel('branch')->getPairs($productID, '', $projectID); + if($product->type != 'normal') $branches = $this->loadModel('branch')->getPairs($productID, '', $projectID); + if(!in_array($this->lang->branch->main, $branches)) $branches = array('0' => $this->lang->branch->main) + $branches; if($_POST) {