* Fix bug.

This commit is contained in:
wangyuting
2022-11-14 03:09:41 +00:00
parent 461aa69449
commit def5bab5f4
+6 -1
View File
@@ -311,11 +311,16 @@ class buildModel extends model
$build->stories = '';
$build->bugs = '';
if($projectID)
if($projectID && !$executionID)
{
$project = $this->loadModel('project')->getByID($projectID);
if(!$project->multiple) $executionID = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq($projectID)->fetch('id');
}
else if($executionID && !$projectID)
{
$execution = $this->loadModel('execution')->getByID($executionID);
$projectID = $execution->project;
}
$build = fixer::input('post')
->setDefault('project', $projectID)