aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2022-12-21 23:45:44 +0100
committerGitHub <noreply@github.com>2022-12-21 16:45:44 -0600
commitb76718249ab39b4d6502e373c09b50989389157a (patch)
tree36283ff4ee0b346db43f9a975a082570185ad4bd /routers
parent48d71b7d6b0ddefdc1db76d5b5f3b3eabc4ae9e4 (diff)
downloadgitea-b76718249ab39b4d6502e373c09b50989389157a.tar.gz
gitea-b76718249ab39b4d6502e373c09b50989389157a.zip
Allow empty assignees on pull request edit (#22150)
Fixes #22140
Diffstat (limited to 'routers')
-rw-r--r--routers/api/v1/repo/pull.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go
index 1246ede9e6..ed23b267f2 100644
--- a/routers/api/v1/repo/pull.go
+++ b/routers/api/v1/repo/pull.go
@@ -490,6 +490,11 @@ func EditPullRequest(ctx *context.APIContext) {
issue := pr.Issue
issue.Repo = ctx.Repo.Repository
+ if err := issue.LoadAttributes(ctx); err != nil {
+ ctx.Error(http.StatusInternalServerError, "LoadAttributes", err)
+ return
+ }
+
if !issue.IsPoster(ctx.Doer.ID) && !ctx.Repo.CanWrite(unit.TypePullRequests) {
ctx.Status(http.StatusForbidden)
return