From 7d9494ebb2e4abee26b3dbd28c9c5f27d138c199 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 9 Jun 2022 15:33:37 +0800 Subject: [PATCH] fix bug --- pkg/common/db/mysql_model/im_mysql_model/organization_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/organization_model.go b/pkg/common/db/mysql_model/im_mysql_model/organization_model.go index 35db7c36d..517287eea 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/organization_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/organization_model.go @@ -262,7 +262,7 @@ func GetDepartmentParent(departmentID string, dbConn *gorm.DB, parentIDList *[]s return err } if department.DepartmentID != "" { - *parentIDList = append(*parentIDList, department.ParentID) + *parentIDList = append(*parentIDList, department.DepartmentID) err = GetDepartmentParent(department.DepartmentID, dbConn, parentIDList) if err != nil { return err