Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-28 04:36:11 +01:00

Fix logging bug

Error logged everytime an assignee was removed
This commit is contained in:
Ethan Koenig 2017-02-11 12:11:07 -05:00 committed by Kim "BKC" Carlbäcker
parent d76f34ef51
commit 076f940f1f

View file

@ -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 {
if err := PrepareWebhooks(issue.Repo, HookEventPullRequest, apiPullRequest); err != nil {
log.Error(4, "PrepareWebhooks [is_pull: %v, remove_assignee: %v]: %v", issue.IsPull, isRemoveAssignee, err)
} else {
go HookQueue.Add(issue.RepoID)
return nil
}
}
go HookQueue.Add(issue.RepoID)
return nil
}