Browse Source

删除多余的代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/3432/head
zouap 2 years ago
parent
commit
2dd91ddba9
1 changed files with 0 additions and 28 deletions
  1. +0
    -28
      models/issue.go

+ 0
- 28
models/issue.go View File

@@ -840,34 +840,6 @@ func (issue *Issue) GetLastEventLabel() string {
}

// GetLastComment return last comment for the current issue.
func (issue *Issue) GetCloseUser() (*User, error) {
var c Comment
tmp := CommentTypeClose
if issue.IsPull {
tmp = CommentTypeMergePull
}
exist, err := x.Where("type = ?", tmp).
And("issue_id = ?", issue.ID).Desc("id").Get(&c)
if err != nil {
return nil, err
}
if !exist {
if issue.Poster == nil {
issue.LoadPoster()
}
return issue.Poster, nil
}
err = c.LoadPoster()
if c.Poster != nil {
return c.Poster, nil
}
if issue.Poster == nil {
issue.LoadPoster()
}
return issue.Poster, nil
}

// GetLastComment return last comment for the current issue.
func (issue *Issue) GetLastComment() (*Comment, error) {
var c Comment
exist, err := x.Where("type = ?", CommentTypeComment).


Loading…
Cancel
Save