diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/issue_assignees.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/models/issue_assignees.go b/models/issue_assignees.go index b4f346974b..09d4d310dc 100644 --- a/models/issue_assignees.go +++ b/models/issue_assignees.go @@ -159,12 +159,13 @@ func (issue *Issue) changeAssignee(sess *xorm.Session, doer *User, assigneeID in return fmt.Errorf("createAssigneeComment: %v", err) } + // if issue/pull is in the middle of creation - don't call webhook + if isCreate { + return nil + } + mode, _ := accessLevel(sess, doer.ID, issue.Repo) if issue.IsPull { - // if pull request is in the middle of creation - don't call webhook - if isCreate { - return nil - } if err = issue.loadPullRequest(sess); err != nil { return fmt.Errorf("loadPullRequest: %v", err) } |