* [task#126934] Fix Bug on create project in api.

This commit is contained in:
liyang
2024-08-26 15:37:43 +08:00
committed by 曹延义
parent b0cd30b6b2
commit b7138f6fdd
+6
View File
@@ -153,6 +153,12 @@ class projectZen extends project
$multipleProducts = $this->loadModel('product')->getMultiBranchPairs($topProgramID);
foreach($rawdata->products as $index => $productID)
{
if(defined('RUN_MODE') && RUN_MODE == 'api')
{
$product = $this->loadModel('product')->getById($productID);
if(empty($product)) dao::$errors['products'][$index][$productID] = $this->lang->project->api->error->productNotFound;
}
if(isset($multipleProducts[$productID]))
{
foreach($rawdata->branch[$index] as $branchID)