diff options
author | Ethan Koenig <ethantkoenig@gmail.com> | 2017-10-04 21:43:04 -0700 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-10-05 07:43:04 +0300 |
commit | aa962deec037375a7cfae3b96094becdfe48e778 (patch) | |
tree | b4322667ac85dd945c0a6aa65c96ba4fa9b96654 /models/issue_comment.go | |
parent | e1266a19c847600aceee6f16875e0384c7c0f736 (diff) | |
download | gitea-aa962deec037375a7cfae3b96094becdfe48e778.tar.gz gitea-aa962deec037375a7cfae3b96094becdfe48e778.zip |
Replace deprecated Id method with ID (#2655)
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) |