diff --git a/module/project/model.php b/module/project/model.php index d3d9544f00..7f381a0c3a 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -709,6 +709,8 @@ class projectModel extends model */ public function getBrotherProjects($project) { + if($project->parent == 0) return array($project->id => $project); + $projectIds = array_filter(explode(',', $project->path)); $parentProgram = $this->dao->select('*')->from(TABLE_PROGRAM) ->where('id')->in($projectIds)