Skip to content

Commit

Permalink
Fix logging bug
Browse files Browse the repository at this point in the history
Error logged everytime an assignee was removed
  • Loading branch information
ethantkoenig authored and bkcsoft committed Feb 12, 2017
1 parent d76f34e commit 076f940
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions models/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -775,14 +775,12 @@ func (issue *Issue) ChangeAssignee(doer *User, assigneeID int64) (err error) {
} else {
apiPullRequest.Action = api.HookIssueAssigned
}
err = PrepareWebhooks(issue.Repo, HookEventPullRequest, apiPullRequest)
}
if err != nil {
log.Error(4, "PrepareWebhooks [is_pull: %v, remove_assignee: %v]: %v", issue.IsPull, isRemoveAssignee, err)
} else {
go HookQueue.Add(issue.RepoID)
if err := PrepareWebhooks(issue.Repo, HookEventPullRequest, apiPullRequest); err != nil {
log.Error(4, "PrepareWebhooks [is_pull: %v, remove_assignee: %v]: %v", issue.IsPull, isRemoveAssignee, err)
return nil
}
}

go HookQueue.Add(issue.RepoID)
return nil
}

Expand Down

0 comments on commit 076f940

Please sign in to comment.