From fc0834cadb58c0ff69860afcbdf297a710b0eefb Mon Sep 17 00:00:00 2001 From: mayue Date: Wed, 1 Dec 2021 14:58:20 +0800 Subject: [PATCH 1/2] * Modify code #44987,44988,44989. --- module/branch/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/branch/model.php b/module/branch/model.php index af21dc8db8..88a71c0129 100644 --- a/module/branch/model.php +++ b/module/branch/model.php @@ -526,7 +526,7 @@ class branchModel extends model if(empty($productID) and empty($moduleID)) { $productPairs = $this->product->getProductPairsByProject($executionID); - $productID = count($productPairs) == 1 ? key($productPairs) : 0; + if($this->app->tab != 'project') $productID = count($productPairs) == 1 ? key($productPairs) : 0; } elseif(empty($productID) and !empty($moduleID)) { From a2dc25af7c6e142cbd51637ac9946a03ed217314 Mon Sep 17 00:00:00 2001 From: mayue Date: Wed, 1 Dec 2021 15:02:12 +0800 Subject: [PATCH 2/2] * Code format. --- module/branch/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/branch/model.php b/module/branch/model.php index 88a71c0129..68c486dfaf 100644 --- a/module/branch/model.php +++ b/module/branch/model.php @@ -526,7 +526,7 @@ class branchModel extends model if(empty($productID) and empty($moduleID)) { $productPairs = $this->product->getProductPairsByProject($executionID); - if($this->app->tab != 'project') $productID = count($productPairs) == 1 ? key($productPairs) : 0; + if($this->app->tab != 'project') $productID = count($productPairs) == 1 ? key($productPairs) : 0; } elseif(empty($productID) and !empty($moduleID)) {