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/pull.go | |
parent | e1266a19c847600aceee6f16875e0384c7c0f736 (diff) | |
download | gitea-aa962deec037375a7cfae3b96094becdfe48e778.tar.gz gitea-aa962deec037375a7cfae3b96094becdfe48e778.zip |
Replace deprecated Id method with ID (#2655)
Diffstat (limited to 'models/pull.go')
-rw-r--r-- | models/pull.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/pull.go b/models/pull.go index 984a1b3038..ae6d13ed79 100644 --- a/models/pull.go +++ b/models/pull.go @@ -422,7 +422,7 @@ func (pr *PullRequest) setMerged() (err error) { if err = pr.Issue.changeStatus(sess, pr.Merger, pr.Issue.Repo, true); err != nil { return fmt.Errorf("Issue.changeStatus: %v", err) } - if _, err = sess.Id(pr.ID).Cols("has_merged").Update(pr); err != nil { + if _, err = sess.ID(pr.ID).Cols("has_merged").Update(pr); err != nil { return fmt.Errorf("update pull request: %v", err) } @@ -795,7 +795,7 @@ func GetPullRequestByIndex(repoID int64, index int64) (*PullRequest, error) { func getPullRequestByID(e Engine, id int64) (*PullRequest, error) { pr := new(PullRequest) - has, err := e.Id(id).Get(pr) + has, err := e.ID(id).Get(pr) if err != nil { return nil, err } else if !has { @@ -829,13 +829,13 @@ func GetPullRequestByIssueID(issueID int64) (*PullRequest, error) { // Update updates all fields of pull request. func (pr *PullRequest) Update() error { - _, err := x.Id(pr.ID).AllCols().Update(pr) + _, err := x.ID(pr.ID).AllCols().Update(pr) return err } // UpdateCols updates specific fields of pull request. func (pr *PullRequest) UpdateCols(cols ...string) error { - _, err := x.Id(pr.ID).Cols(cols...).Update(pr) + _, err := x.ID(pr.ID).Cols(cols...).Update(pr) return err } |