* Fix bug.

This commit is contained in:
tianshujie98
2021-02-25 13:46:52 +08:00
parent cd59ba3da3
commit 541cd5b91c
+2 -1
View File
@@ -2237,12 +2237,13 @@ class projectModel extends model
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembers();
$project = $this->getByID($projectID);
$type = $this->config->global->mode == 'new' ? $project->type : 'project';
if(empty($project)) return array();
return $this->dao->select("t1.*, t1.hours * t1.days AS totalHours, t2.id as userID, if(t2.deleted='0', t2.realname, t1.account) as realname")->from(TABLE_TEAM)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
->where('t1.root')->eq((int)$projectID)
->andWhere('t1.type')->eq($project->type)
->andWhere('t1.type')->eq($type)
->andWhere('t2.deleted')->eq('0')
->fetchAll('account');
}