summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/pull.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-04-15 02:18:28 +0800
committerGitHub <noreply@github.com>2023-04-14 14:18:28 -0400
commitcfe3d6e9b507a9331328e55ff98a1f582abae185 (patch)
tree94b035bd2859291a16edda27822b570bdd611a35 /routers/api/v1/repo/pull.go
parentb667634b32e240f3f3260ab7e304f72f4ff75659 (diff)
downloadgitea-cfe3d6e9b507a9331328e55ff98a1f582abae185.tar.gz
gitea-cfe3d6e9b507a9331328e55ff98a1f582abae185.zip
Make more functions use ctx instead of db.DefaultContext (#24068)
Continue the "ctx refactoring" work. There are still a lot db.DefaultContext, incorrect context could cause database deadlock errors.
Diffstat (limited to 'routers/api/v1/repo/pull.go')
-rw-r--r--routers/api/v1/repo/pull.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go
index 9b5ec0b3f8..f4e2969d7d 100644
--- a/routers/api/v1/repo/pull.go
+++ b/routers/api/v1/repo/pull.go
@@ -534,7 +534,7 @@ func EditPullRequest(ctx *context.APIContext) {
// Send an empty array ([]) to clear all assignees from the Issue.
if ctx.Repo.CanWrite(unit.TypePullRequests) && (form.Assignees != nil || len(form.Assignee) > 0) {
- err = issue_service.UpdateAssignees(issue, form.Assignee, form.Assignees, ctx.Doer)
+ err = issue_service.UpdateAssignees(ctx, issue, form.Assignee, form.Assignees, ctx.Doer)
if err != nil {
if user_model.IsErrUserNotExist(err) {
ctx.Error(http.StatusUnprocessableEntity, "", fmt.Sprintf("Assignee does not exist: [name: %s]", err))