Merge branch 'main' into feature/bots

This commit is contained in:
Jason Song
2022-12-05 14:31:00 +08:00
163 changed files with 471 additions and 447 deletions

View File

@ -580,7 +580,7 @@ func (c *Comment) LoadAssigneeUserAndTeam() error {
var err error
if c.AssigneeID > 0 && c.Assignee == nil {
c.Assignee, err = user_model.GetUserByIDCtx(db.DefaultContext, c.AssigneeID)
c.Assignee, err = user_model.GetUserByID(db.DefaultContext, c.AssigneeID)
if err != nil {
if !user_model.IsErrUserNotExist(err) {
return err
@ -615,7 +615,7 @@ func (c *Comment) LoadResolveDoer() (err error) {
if c.ResolveDoerID == 0 || c.Type != CommentTypeCode {
return nil
}
c.ResolveDoer, err = user_model.GetUserByIDCtx(db.DefaultContext, c.ResolveDoerID)
c.ResolveDoer, err = user_model.GetUserByID(db.DefaultContext, c.ResolveDoerID)
if err != nil {
if user_model.IsErrUserNotExist(err) {
c.ResolveDoer = user_model.NewGhostUser()