diff options
author | guillep2k <18600385+guillep2k@users.noreply.github.com> | 2019-08-26 23:17:23 -0300 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-08-26 22:17:23 -0400 |
commit | 5fe2ec264febd6a4112c5f8c72c170f016bdf0c8 (patch) | |
tree | bc1261858b8278189d7b30c51faaa9b442245d0d /routers/repo/pull.go | |
parent | 541fab196f216771a51419a8b8d353694afa6c45 (diff) | |
download | gitea-5fe2ec264febd6a4112c5f8c72c170f016bdf0c8.tar.gz gitea-5fe2ec264febd6a4112c5f8c72c170f016bdf0c8.zip |
Retry create issue to cope with duplicate keys (#7898)
* Retry create issue to cope with duplicate keys
* Use .SetExpr().Where().Insert()
Diffstat (limited to 'routers/repo/pull.go')
-rw-r--r-- | routers/repo/pull.go | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go index 01a57f04e4..22ccc7769c 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -710,15 +710,8 @@ func CompareAndPullRequestPost(ctx *context.Context, form auth.CreateIssueForm) return } - maxIndex, err := models.GetMaxIndexOfIssue(repo.ID) - if err != nil { - ctx.ServerError("GetPatch", err) - return - } - pullIssue := &models.Issue{ RepoID: repo.ID, - Index: maxIndex + 1, Title: form.Title, PosterID: ctx.User.ID, Poster: ctx.User, |