From 3d833daad2d56cccccbcd4fda0588a4195f49ecf Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Tue, 2 Feb 2021 10:24:16 +0800 Subject: [PATCH] * Fix bug #3881. --- module/project/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/project/model.php b/module/project/model.php index 500512131d..da47b1b2da 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2298,12 +2298,13 @@ class projectModel extends model */ public function getTeams2Import($account, $currentProject) { + $project = $this->dao->findById($currentProject)->from(TABLE_PROJECT)->fetch(); return $this->dao->select('t1.root, t2.name as projectName') ->from(TABLE_TEAM)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.root = t2.id') ->where('t1.account')->eq($account) ->andWhere('t1.root')->ne($currentProject) - ->andWhere('t1.type')->eq('project') + ->andWhere('t1.type')->eq($project->type) ->andWhere('t2.deleted')->eq('0') ->groupBy('t1.root') ->orderBy('t1.root DESC')