Skip to content

Commit

Permalink
ajust to go-gitea#19649
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 authored May 8, 2022
1 parent daf146a commit f1037f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routers/web/repo/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -1074,8 +1074,8 @@ func CancelAutoMergePullRequest(ctx *context.Context) {
return
}

if err := pull_model.RemoveScheduledAutoMerge(ctx, ctx.Doer, issue.PullRequest.ID, true); err != nil {
if models.IsErrNotExist(err) {
if err := automerge.RemoveScheduledAutoMerge(ctx, ctx.Doer, issue.PullRequest); err != nil {
if db.IsErrNotExist(err) {
ctx.Flash.Error(ctx.Tr("repo.pulls.pull_request_not_scheduled"))
ctx.Redirect(fmt.Sprintf("%s/pulls/%d", ctx.Repo.RepoLink, issue.Index))
return
Expand Down

0 comments on commit f1037f3

Please sign in to comment.