Skip to content

Commit fe27e0b

Browse files
committed
improve code
1 parent 43b0551 commit fe27e0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/api/v1/repo/issue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) {
345345
// Pass one or more user logins to replace the set of assignees on this Issue.
346346
// Send an empty array ([]) to clear all assignees from the Issue.
347347

348-
if ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) && (form.Assignees != nil || form.Assignee != nil) {
348+
if canWrite && (form.Assignees != nil || form.Assignee != nil) {
349349
oneAssignee := ""
350350
if form.Assignee != nil {
351351
oneAssignee = *form.Assignee

0 commit comments

Comments
 (0)