diff options
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r-- | models/issue_comment.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go index 25d6535752..956fad73e1 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -356,7 +356,7 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err attachments[i].IssueID = opts.Issue.ID attachments[i].CommentID = comment.ID // No assign value could be 0, so ignore AllCols(). - if _, err = e.Id(attachments[i].ID).Update(attachments[i]); err != nil { + if _, err = e.ID(attachments[i].ID).Update(attachments[i]); err != nil { return nil, fmt.Errorf("update attachment [%d]: %v", attachments[i].ID, err) } } @@ -569,7 +569,7 @@ func CreateRefComment(doer *User, repo *Repository, issue *Issue, content, commi // GetCommentByID returns the comment by given ID. func GetCommentByID(id int64) (*Comment, error) { c := new(Comment) - has, err := x.Id(id).Get(c) + has, err := x.ID(id).Get(c) if err != nil { return nil, err } else if !has { @@ -647,7 +647,7 @@ func GetCommentsByRepoIDSince(repoID, since int64) ([]*Comment, error) { // UpdateComment updates information of comment. func UpdateComment(c *Comment) error { - if _, err := x.Id(c.ID).AllCols().Update(c); err != nil { + if _, err := x.ID(c.ID).AllCols().Update(c); err != nil { return err } else if c.Type == CommentTypeComment { UpdateIssueIndexer(c.IssueID) |