diff --git a/internal/demo/register/onboarding_process.go b/internal/demo/register/onboarding_process.go index 1d7e610ac..6f3f0b15f 100644 --- a/internal/demo/register/onboarding_process.go +++ b/internal/demo/register/onboarding_process.go @@ -147,7 +147,7 @@ func joinGroups(operationID, userID, userName string, groupIDList []string) { GroupID: groupID, Reason: "register auto join", InvitedUserIDList: []string{userID}, - OpUserID: userID, + OpUserID: config.Config.Manager.AppManagerUid[0], } resp, err := client.InviteUserToGroup(context.Background(), req) if err != nil { 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 ea2e768fa..f515f4afa 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 @@ -261,7 +261,7 @@ func GetDepartmentParent(departmentID string, dbConn *gorm.DB, parentIDList *[]s if err != nil { return err } - if department.ParentID != "" { + if department.DepartmentID != "" { *parentIDList = append(*parentIDList, department.ParentID) err = GetDepartmentParent(departmentID, dbConn, parentIDList) if err != nil {