diff --git a/module/execution/model.php b/module/execution/model.php index 8a0a562f5a..69d78ba413 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2012,7 +2012,7 @@ class executionModel extends model $project = $this->loadModel('project')->getById($execution->project); $brotherProjects = $this->project->getBrotherProjects($project); $executions = $this->dao->select('id')->from(TABLE_EXECUTION) - ->where('project')->in(array_keys($brotherProjects)) + ->where('project')->in($brotherProjects) ->andWhere('status')->ne('closed') ->fetchPairs('id'); diff --git a/module/project/model.php b/module/project/model.php index af675d3055..0020701820 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -709,7 +709,7 @@ class projectModel extends model */ public function getBrotherProjects($project) { - if($project->parent == 0) return array($project->id => $project); + if($project->parent == 0) return array($project->id => $project->id); $projectIds = array_filter(explode(',', $project->path)); $parentProgram = $this->dao->select('*')->from(TABLE_PROGRAM)