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