aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--services/pull/check.go2
-rw-r--r--services/pull/pull.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/services/pull/check.go b/services/pull/check.go
index e2f39ce163..9ed8f3a08f 100644
--- a/services/pull/check.go
+++ b/services/pull/check.go
@@ -47,7 +47,7 @@ func checkAndUpdateStatus(pr *models.PullRequest) {
// Make sure there is no waiting test to process before leaving the checking status.
if !pullRequestQueue.Exist(pr.ID) {
- if err := pr.UpdateCols("merge_base", "status", "conflicted_files"); err != nil {
+ if err := pr.UpdateColsIfNotMerged("merge_base", "status", "conflicted_files"); err != nil {
log.Error("Update[%d]: %v", pr.ID, err)
}
}
diff --git a/services/pull/pull.go b/services/pull/pull.go
index 2a09c98bfe..57e33ec5be 100644
--- a/services/pull/pull.go
+++ b/services/pull/pull.go
@@ -115,7 +115,7 @@ func ChangeTargetBranch(pr *models.PullRequest, doer *models.User, targetBranch
if pr.Status == models.PullRequestStatusChecking {
pr.Status = models.PullRequestStatusMergeable
}
- if err := pr.UpdateCols("status, conflicted_files, base_branch"); err != nil {
+ if err := pr.UpdateColsIfNotMerged("merge_base", "status", "conflicted_files", "base_branch"); err != nil {
return err
}