diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 1f55367be..6f10bc6d6 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -648,7 +648,11 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI return e.GroupID }) resp.GroupInfos = utils.Slice(groups, func(e *relationTb.GroupModel) *sdkws.GroupInfo { - return convert.Db2PbGroupInfo(e, ownerMap[e.GroupID].UserID, groupMemberNumMap[e.GroupID]) + var ownerUserID string + if owner, ok := ownerMap[e.GroupID]; ok { + ownerUserID = owner.UserID + } + return convert.Db2PbGroupInfo(e, ownerUserID, groupMemberNumMap[e.GroupID]) }) return resp, nil }