1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-23 09:04:26 +00:00

table pull_request wasn't updated correctly (#2649)

* Fix: table `pull_request` won't be updated correctly

* Update also status column when manually merged
This commit is contained in:
Kazuki Sawada 2017-10-06 06:25:40 +09:00 committed by Lauris BH
parent 6b62f042c6
commit ffab139c91

View File

@ -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, status, merged_commit_id, merger_id, merged_unix").Update(pr); err != nil {
return fmt.Errorf("update pull request: %v", err)
}