diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-12-21 23:45:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-21 16:45:44 -0600 |
commit | b76718249ab39b4d6502e373c09b50989389157a (patch) | |
tree | 36283ff4ee0b346db43f9a975a082570185ad4bd /routers | |
parent | 48d71b7d6b0ddefdc1db76d5b5f3b3eabc4ae9e4 (diff) | |
download | gitea-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.go | 5 |
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 |