Skip to content

Commit

Permalink
Fix failure on creating pull request with assignees (go-gitea#4419)
Browse files Browse the repository at this point in the history
  • Loading branch information
SagePtr committed Aug 1, 2018
1 parent ced08d1 commit 456a8ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions models/issue_assignees.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ func (issue *Issue) changeAssignee(sess *xorm.Session, doer *User, assigneeID in
mode, _ := accessLevel(sess, doer.ID, issue.Repo)
if issue.IsPull {
if err = issue.loadPullRequest(sess); err != nil {
// If pull request is not yet created - don't fail here, skip webhooks
if IsErrPullRequestNotExist(err) {
return nil
}
return fmt.Errorf("loadPullRequest: %v", err)
}
issue.PullRequest.Issue = issue
Expand Down

0 comments on commit 456a8ed

Please sign in to comment.