Skip to content

Commit a3454c1

Browse files
committed
fix
1 parent 145b583 commit a3454c1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

routers/api/v1/repo/issue_label.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ func AddIssueLabels(ctx *context.APIContext) {
109109
return
110110
}
111111

112+
// if permission is denied, the prepareForReplaceOrAdd function will return nil, nil, nil
113+
if ctx.Written() {
114+
return
115+
}
116+
112117
if err = issue_service.AddLabels(ctx, issue, ctx.Doer, labels); err != nil {
113118
ctx.Error(http.StatusInternalServerError, "AddLabels", err)
114119
return

0 commit comments

Comments
 (0)